It is a well-known fact that external links can be opened in a new browser window via
target="_blank"
. It is a little-known fact that this can cause security risks and performance issues on your own webpage.
A simple link like <a href="otherwebsite.com" target="_blank">
allows the targeted webpage to take control of your own webpage from which the link was launched (more details can be found here).
In addition, this inconspicuous little HTML attribute may also cause the performance of your own webpage to suffer if the newly opened webpage runs expensive Javascript. Jake Archibald created a demo that illustrates the performance impact.
The solution to fix both issues is to add another attribute to that same link: rel="noopener"
. If you are not sure whether or not your site uses _blank
simply run Google’s Lighthouse test. It will tell you which links need attention.