rel="noopener"
is an HTML attribute that is used when you add a link in WordPress and want it to open in a new browser tab. It's also usually used in conjunction with therel="noreferrer"
attributes together.WordPress introduced these two features primarily to fix a security hole that could be exploited by malicious websites. These two attributes enhance the security of your website against potential risks.
There are JavaScript functions that allow newly opened browser tabs to control their source window. If you link to external sites infected with malicious code, these sites may utilize thewindow.opener
This JavaScript property, changes your original page (that is, your website) to steal information or spread malicious code.
![图片[1]-WordPress中rel=“noopener”是指什么?-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/04/image-514.png)
increaserel="noopener"
This property then prevents newly opened tabs from utilizing such JavaScript functionality. Also.rel="noreferrer"
attribute, on the other hand, prevents source information from being passed to newly opened tabs. These two attributes protect your website from being exploited by malicious websites, thus ensuring the safety of your users.
<a href="http://example.com" target="_blank" rel="noreferrer noopener">external link</a>
WordPress has always been at the forefront of efforts to improve the security of websites. When you add links in WordPress and choose to open them in a new tab, the system automatically adds therel="noopener"
respond in singingrel="noreferrer"
Attributes. Doing so can greatly enhance the security of your website. However, you don't have to worry about this affecting your SEO rankings or overall WordPress performance, as therel="noopener"
Attributes do not have any impact on these aspects. These attributes make your site more secure without affecting other important metrics.
![图片[2]-WordPress中rel=“noopener”是指什么?-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/04/image-515.png)
A lot of people tend to putrel="noopener"
respond in singingrel="nofollow"
These two properties get confused, but they are actually two completely different things.noopener
Attributes are mainly used to enhance WordPress security by preventing your website from cross-site attacks. While thenofollow
Attributes, on the other hand, are used to prevent your website from passing SEO link weight to the site being linked to. When a search engine scans for links on your site, it looks at and considers thenofollow
attribute, but will not consider thenoopener
Properties.noopener
Off site security.nofollow
Concerning SEO, they each play a different role.
![图片[3]-WordPress中rel=“noopener”是指什么?-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/04/image-516.png)
If you do need to remove this setting, then you'll need to first disable the Gutenberg block editor in WordPress and then switch back to the old Classic editor. After that, you'll also need to add a specific piece of code to the functions.php of your theme file or to a plugin developed specifically for your site. In this way, you will be able to realize your needs.
add_filter('tiny_mce_before_init','wpb_disable_noopener');
function wpb_disable_noopener( $mceInit ) {
$mceInit['allow_unsafe_link_target']=true;
return $mceInit ;
}
![图片[4]-WordPress中rel=“noopener”是指什么?-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/04/image-517.png)
Link to this article:https://www.361sale.com/en/7850The article is copyrighted and must be reproduced with attribution.
No comments