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

Asked

Viewed 74 times

4

I recently noticed that the property rel of link may receive the tribute noopener, but I didn’t quite understand the advantages of using it...

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

It would be good practice to include this rel="noopener" on all links on my website?

It may have some unwanted side effect to SEO?

  • if even @hugocsl takes a -1, it calms me hehehehe, Dude already answered

  • @Ricardo the funny eh who has 3 days the question, then when someone has the good will to collaborate with some content someone goes and gives me a negative rss. You’ll understand...

  • Pure repression! Kkkk! I didn’t think I could use window.opener that way!

  • @Lipespry unfortunately here has this kind of thing... But the important thing is to contribute this kind of thing is irrelevant, a comment or tip, or criticize is 10x more constructive than a downvote, but there are people who prefer to hide their face behind the downvotes, which very little or almost nothing make anything better in the content. When you give a personal tip or criticize yourself, you open a communication channel, different from a vote of disqualification that means little...

  • 1

    It affects rankings and how much nobody knows, but in Lighthouse (web.dev) external links with _blank draw points in good practice and suggest noopener as a solution.

  • https://developers.google.com/web/tools/lighthouse/audits/noopener?hl=pt-br

  • 1

    @gustavox o Lighthouse realmente eh uma ferramenta fantástica eh not only for SEO, but for accessibility and performance tbm. Valeu a dica!

Show 2 more comments

1 answer

2


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

Most browsers are multiprocess - with the exception of Firefox, but they’re working on it. Each process has several threads, including what is often called "the main thread". This is where the analysis, style calculation, layout, CSS Painting and Javascript (non-worker) are executed. This means that Javascript running on a domain runs on a different thread to a window/tab accessing another domain.

However, due to the cross-window synchronous access that DOM provides via window.opener, windows run 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 rel="noopener" in external links, it is specified that access should be done in another process, bringing benefits in the areas of security and performance!

For now, it is not yet something supported in absolutely every browser, but the idea is that these benefits are soon seen by vendors and that their products are prepared for noopener as soon as possible. Also, it is possible that in the future there are more practical ways to, for example, specify that all links must obey this Feature without the need to specify link by link.

Source: https://desenvolvimentoparaweb.com/miscelanea/relnoopener-performance-seguranca/

  • 4

    Friend when you copy full texts from other places or even if they are parts of a text that is not your you should at least quote the source or the original author ok. Abs Happy Holidays

  • @hugocsl Thank you, mentioned source.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.