Hacker News new | past | comments | ask | show | jobs | submit login
The danger of target=_blank and opener (pingtech.xyz)
38 points by github-cat on Sept 15, 2018 | hide | past | favorite | 11 comments



Not the main point of the article, but he makes a comment that doesn't sit well with me.

> Also for SEO consideration, rel="nofollow" is also recommended.

If you are linking to another site, that helps said site's SEO ranking. If you use this in a way that the search engine views as cheating, the other site is penalized.

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.

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?


100% agreed with this. In fact, this obsession with adding nofollow to links is likely both why Google results have suffered a bit in recent years and also why Google is apparently starting to ignore the nofollow attribute on some links altogether. Use nofollow where it's relevant, not as some blanket rule for every external link on a website.

https://searchengineland.com/nofollow-links-not-useless-earn...


Right, this recommendation only makes sense for user-generated content where you've been infiltrated by spammers trying to improve their page rank. It doesn't make any sense at all in the context of controlled content


Isn't nofollow largely ignored by ranking algorithms? Seems like those links were still giving some link juice even a decade ago.


Previous discussion: https://news.ycombinator.com/item?id=12380671

There were some high profile sites affected by this by the way, I think it was Instagram where it actually went wrong.


There are performance implications to adding noopener, as outlined in inhttps://jakearchibald.com/2016/performance-benefits-of-rel-n...

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 may actually slow down the site being opened because of the additional time required to initialize the new child's process.

It also prevents sites that want to auto-close their opened tab/popup, like Facebook and other sharing sites, from being able to call `window.close` after sharing is complete.


Now that Chrome is moving towards strict site isolation in the wake of Spectre, that advice is probably obsolete -- Chrome will always create a new process for the new tab even if you keep the opener reference.


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.


add base tag with rel=noopener to everything you do today and be protected when browsers actually implement support for it.


Or add rel=noopener to all links today and be protected now?


you can have both. but the base tag will make it default instead of on each a tag.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: