TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The danger of target=_blank and opener

38 pointsby github-catover 6 years ago

5 comments

sam_goodyover 6 years ago
Not the main point of the article, but he makes a comment that doesn&#x27;t sit well with me.<p>&gt; Also for SEO consideration, rel=&quot;nofollow&quot; is also recommended.<p>If you are linking to another site, that helps said site&#x27;s SEO ranking. If you use this in a way that the search engine views as cheating, the other site is penalized.<p>But as long as you and the other site are being fair, then you SHOULD link to them - they are obviously providing good content that you think is important, so why try to hog the credit and not give them the ranking they deserve.<p>Sitye like Stackoverflow do this to cut down on spam, (and perhaps because they want Google to view them as the original), but for a blog or whatever, why would you recommend this?
评论 #17995629 未加载
评论 #17995976 未加载
评论 #17995896 未加载
afracaover 6 years ago
Previous discussion: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=12380671" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=12380671</a><p>There were some high profile sites affected by this by the way, I think it was Instagram where it actually went wrong.
评论 #17995471 未加载
davidmurdochover 6 years ago
There are performance implications to adding noopener, as outlined in in<a href="https:&#x2F;&#x2F;jakearchibald.com&#x2F;2016&#x2F;performance-benefits-of-rel-noopener&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jakearchibald.com&#x2F;2016&#x2F;performance-benefits-of-rel-n...</a><p>While the above link suggests noopener is beneficial to add as it will prevent the parent JS process from being paused by long running scripts in the child process, it <i>may</i> actually slow down the site being <i>opened</i> because of the additional time required to initialize the new child&#x27;s process.<p>It also prevents sites that want to auto-close their opened tab&#x2F;popup, like Facebook and other sharing sites, from being able to call `window.close` after sharing is complete.
评论 #17996590 未加载
daveFNbuckover 6 years ago
Is there a need for the default behavior? It feels like browsers should just switch this to the default for all external links with target=_blank.
gcb0over 6 years ago
add base tag with rel=noopener to everything you do today and be protected when browsers actually implement support for it.
评论 #17995942 未加载