This document discusses cross-origin resource sharing (CORS) and content security policy (CSP) as techniques to improve security in web applications. It begins by explaining the need for the same-origin policy and how CORS helps address limitations of SOP by allowing controlled cross-origin requests. It then discusses cross-site scripting (XSS) attacks and how CSP helps prevent XSS by allowing web applications to restrict resources that can be loaded or executed.