---
title: Same-origin policy
slug: Glossary/Same-origin_policy
tags:
  - Glossary
  - Same-origin policy
  - origin
---
The **[same-origin policy](/en-US/docs/Web/Security/Same-origin_policy)** is a critical security mechanism that restricts how a document or script loaded from one {{Glossary("origin")}} can interact with a resource from another origin.

It helps isolate potentially malicious documents, reducing possible attack vectors.

## See also

- [Same-origin policy](/en-US/docs/Web/Security/Same-origin_policy)
- [MDN Web Docs Glossary](/en-US/docs/Glossary):

  - {{Glossary("CORS")}}
  - {{Glossary("origin")}}
