Whose page is this? (the browser security model)

The places a website reads a stranger’s words. Every defence on its checklist (SameSite, HttpOnly, “check Origin”, a rule saying who may frame the page) is a rule the browser enforces, and this lesson is where those rules come from.
Before you start. Authentication gave you the session: after you log in, the site hands your browser a small pass (a cookie), and the browser shows it on every later request so the site knows it is still you. What a request actually says (HTTP) showed you what a request looks like on the wire, headers and all. This lesson explains why the browser, and not the server, decides which page gets to see what.