19 August 2018

Securely opening tabs to other sites from your webpage

You can use a link on your webpage to open a page from another site in another tab, using

<a ref="https://othersite/otherpage.html" target="_blank">
  to  other page
</a>
Your browser typically opens the other page in a new tab, but this page retains a relation with your webpage and can do some priviliged actions like redirecting the tab of your webpage to another URL.
To prevent this, break the opener and referer links the foreign page has to your webpage by using
<a ref="https://othersite/otherpage.html" target="_blank" rel ="noopener noreferer"> 
   to  other page 
</a>
more...

No comments:

Post a Comment