thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Application & OT Security · Foundational

Same-Origin Policy (SOP)

A browser security model that restricts scripts on one origin from reading data from another origin.

Definition

An origin is the combination of scheme, host and port. SOP prevents a malicious site from reading another site's responses, but it does not stop cross-site requests from being sent, which is why CSRF exists. CORS selectively relaxes SOP.

Example

Script on https://evil.example cannot read the response of a fetch to https://bank.example.

Exam tip

Origin = scheme + host + port; SOP blocks reading, not sending.

Related terms