What is rel="noopener"? Should I use it on all links on my site? Can it affect SEO?

3

I recently noticed that the rel property of the link can receive the noopener tribute, but I did not fully understand the advantages of using it ...

<a href="http://example.com" target="_blank" rel="noopener">Exemplo de link</a>

Would it be a good practice to include this rel="noopener" in all links on my site?

Can it have any unwanted side effects for SEO?

    
asked by anonymous 21.12.2018 / 13:46

1 answer

1

Without this, the new page can access its window object via window.opener. Fortunately, the web source security template prevents it from reading your page; unfortunately for some legacy APIs it means that you can navigate the page to a different URL using window.opener.location = newURL.

Most browsers are multiprocessing - with the exception of Firefox, but they are working on it. Each process has multiple threads, including what is often called the "main thread". This is where CSS analysis, style calculation, layout, painting, and JavaScript (non-worker) are performed. This means that JavaScript running on one domain runs on a different thread for a window / tab accessing another domain.

However, due to synchronous cross-window access that the DOM provides via window.opener, windows executed via target="_ blank" end up in the same process and thread - and the same is true for iframes and windows opened via window. open.

rel="noopener" prevents window.opener, so there is no cross-window access. Chromium browsers are optimized for this and open the new page in their own process.

In other words, when using external links, it is specified that access has to be made in another process, bringing benefits in the areas of security and performance!

For the time being, it is not yet supported by absolutely all browsers, but the idea is that these benefits will soon be seen by the vendors and their products be prepared for the noopener as soon as possible. Also, it is possible that in the future there will be more practical ways, for example, to specify that all links should obey this feature without having to specify a link to link.

Source: link

    
24.12.2018 / 17:03