Skip to main content

Same Origin Policy to Anchors

How does SOP apply to anchors ?

When we link one website to another website. For example, sitea.com is linked siteb.com.

<a href="http://siteb.com"></a>

Whenever such hyperlink is visited. The browser always loads the response in new context(tab/window). Via this the browser makes sure that there is no data leakage between sitea.com and siteb.com.

In simple terms, The response loads in a new window/context. The originating site is replaced by the accessed site.

Hence, any site can link any other site, but can't read the response