TIL External links should not be "=_target"
POSTED ON:
TAGS: webdev
When you link to a page on another site using the target="_blank" attribute, you can expose your site to performance and security issues:
- The other page may run on the same process as your page. If the other page is running a lot of JavaScript, your page's performance may suffer.
- The other page can access your window object with the window.opener property. This may allow the other page to redirect your page to a malicious URL.
Adding rel="noopener"
or rel="noreferrer"
to your target="_blank"
links avoids these issues.
Related TILs
Tagged: webdev