如何知道传入的请求是否来自搜索引擎机器人?

发布于 2024-09-27 20:39:12 字数 50 浏览 0 评论 0原文

有谁知道如何检测传入请求是否来自搜索引擎机器人? HTML 标头是否包含任何特定信息?

Does anyone know how to detect whether an incoming request is from a search engine robot? Do HTML headers contain any specific info for that?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

雨夜星沙 2024-10-04 20:39:12

您通常可以使用 IP 和 HTTP 标头中的用户代理的组合来弄清楚。这里有一篇关于它的文章:http://www.jafsoft.com/searchengines/spider_hunting。 html

You can usually use a combination of IP and the user agent in the HTTP headers to figure it out. There is an article all about it here: http://www.jafsoft.com/searchengines/spider_hunting.html

稚然 2024-10-04 20:39:12

HTTP 请求有一个名为“用户代理”的字段。该字段指定请求是否来自 Mozilla、Internet Explorer 或某些搜索引擎机器人。 Java、php都有自己的命令来读取这个用户代理字段。

在此处输入图像描述

HTTP request has a field named 'user agent'. This field specifies if the request came from Mozilla or internet explorer or some search engine bot. Java, php each has its own command to read this user agent field.

enter image description here

舞袖。长 2024-10-04 20:39:12

您可以使用 jQuery 从请求中检查用户代理。

您可以通过 $.browser 获取此信息

,但请记住,这很容易被欺骗。

You can use jQuery to check the user agent from the request.

You can get to this information through $.browser

Keep in mind, though, that this is easily spoofed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文