Grok-Pedia

same-origin-policy

Same-Origin Policy

The Same-Origin Policy is a critical security mechanism implemented in web browsers to prevent malicious scripts from accessing sensitive data on another website. Here's a detailed look into its aspects:

Definition

The Same-Origin Policy restricts how a document or script loaded from one origin can interact with resources from another origin. An origin is defined by the URL scheme, hostname, and port of the web resource. For example, http://example.com and https://example.com are considered different origins due to the different schemes (HTTP vs HTTPS).

History

Context and Functionality

Modern Implementations

Today, the Same-Origin Policy is not only about JavaScript but also applies to other web technologies like:

External Links for Further Reading

Related Topics

Recently Created Pages