过滤重复的获取请求,Safari在iOS上使用nodejs Express进行

发布于 2025-02-11 10:34:11 字数 232 浏览 0 评论 0原文

我正在记录各个页面尝试构建一些分析的请求数量。我注意到,当在我的iPhone上输入URL进入Safari时,该网站作为建议的网站并自动填充搜索栏,Safari开始提出多个请求来预加载该网站。

有什么方法可以确定请求是在使用express的nodejs在后端打开后端的站点上的野生动物园还是野生动物园?

我正在考虑仅查看IP地址而不是在一定时间范围内来自同一IP的记录请求,但是我想知道是否有一种更干净的方法可以做到这一点。

I'm logging the number of requests that various pages get to try to build up some analytics. I've noticed that when typing in the url into safari on my iPhone, once the site comes up as the suggested site and autofills the search bar, safari starts making multiple requests to preload the site.

Is there any way to identify whether a request is safari preloading the site or safari actually opening the site on the backend using NodeJS with Express?

I'm considering just looking at the IP address and not logging requests that come from the same IP in a certain timeframe but I was wondering if there was a cleaner way to do it.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文