gpt4 book ai didi

html - "rel=nofollow noopener"- 可以同时拥有两者吗?

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:28:44 24 4
gpt4 key购买 nike

我有一个 pdf,我想保护它并且不希望搜索引擎将其编入索引。

目前我的链接如下:

<a href="https://example.com/mypdf.pdf" target="_blank" rel="noopener">View PDF</a>

我可以将 nofollow 标签添加到 rel 标签吗?

然后我会用昏迷还是没有昏迷来划分这两个?

目前正在尝试 rel=nofollow noopener 不昏迷。

我可以将 noindex 添加到同一个标签吗?

<a href="https://example.com/mypdf.pdf" target="_blank" rel="nofollow noindex noopener">View PDF</a>

这行得通吗?

最佳答案

nofollow”标签告诉搜索引擎“不要跟踪此链接”。

noreferrer”标签表示该链接没有泄漏信息。

noopener”标签阻止新页面访问 window.opener 属性(防止恶意 javascript)。

你可以像这样使用两者:

<a href="https://example.com/mypdf.pdf" target="_blank" rel="nofollow noopener">View PDF</a>

noindex”您不能对链接进行 noindex。这必须在页面上的元数据中定义。

如果这就是您所追求的,您最好屏蔽 robots.txt 中的页面。

User-agent: * 
Disallow: /mypdf.pdf

关于html - "rel=nofollow noopener"- 可以同时拥有两者吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45830028/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com