5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

a タグがtarget="_blank"のときnoopenerなしのrel="noreferrer"だけで良いという話

Posted at

概要

<a href="..." rel="noreferrer" target="_blank"> has the same behavior as <a href="..." rel="noreferrer noopener" target="_blank">.

自分も知らなかった
案外知らない人が多そう

気づいた経緯

最近いきなりeslint-plugin-reactのnoopenerなしが怒らなくなったので、調べたら以下が入っており、noreferrerだけで同一の挙動をすることを知った
https://github.com/yannickcr/eslint-plugin-react/pull/2043

https://github.com/yannickcr/eslint-plugin-react/issues/2022#issuecomment-623677544
によるとnoopenerついてないとwindow.openerが削除されないブラウザはないと確認をとっており、レガシーブラウザも大丈夫そうなのもあってこのような変更になったみたい

5
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?