


Without it, any web page would access the DOM of the page of another origin! Specifically, it restricts a document or script loaded from one origin to interact with a resource from another origin. Same Origin Policy controls access to data between websites. To better understand it, the following table gives examples of origin comparisons to. If any of the three elements change, the origin changes too. In the Same Origin Policy, an origin is defined as a tuple of Protocol, Host, and Port (if specified). Browser Security Basics: The Same Origin Policyīefore diving into the details, it is important to explain a critical security mechanism of the browsers: Same Origin Policy. By the end of the blog, you should have a solid understanding of what are the options and the requirements to build a secure browser storage solution. We’ll cover different browser sandboxes like origin sandbox, javascript closures, and process sandbox.

In this blog, I’ll walk you through all the details I shared during the presentation. When talking about browser storage and security, the top 1 concern is an XSS vulnerability, which will allow an attacker to retrieve sensitive data stored in the browser. I recently gave a talk at OWASP Virtual AppSecIL 2020 on “Security Facts and Fallacies about Browser Storage,” where I presented the different browser storage options and the security guarantees they offer.
