Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
293 views
in Technique[技术] by (71.8m points)

html - Opening same window while using noreferrer

Without noreferrer the target opens the link in the same tab if it has already opened.

<a target="google" href="https://www.google.com" rel="noreferrer">Open</a>

While setting rel="noreferrer" attribute on <a> as above will always open new tab.

Is there any way to use same tab(but not current) with noreferrer everytime link clicked?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Opening link in a new window not related to rel="noreferrer" attribute. It related to target attribute. Use this attribute with _self value.

<a target="_self" href="https://www.google.com" rel="noreferrer">Open</a>

Note: the target value is _self as default. You can just remove it.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...