HTTP_X_PURPOSE 的定义是什么?

发布于 2024-08-05 20:44:27 字数 192 浏览 2 评论 0原文

最近,我们一直在查看 Stack Overflow 日志中捕获的一些异常,并发现了 Safari 用户的问题。

我在我们捕获的异常之一中注意到了这个 HTTP 标头:

HTTP_X_PURPOSE  preview

有谁知道什么操作会触发此标头或 HTTP_X_PURPOSE 的含义?

Recently we've been looking at a few exceptions captured in our Stack Overflow logs and have discovered an issue for Safari users.

I noticed this HTTP header in one of the exceptions we have captured:

HTTP_X_PURPOSE  preview

Does anyone know what action triggers this header or the meaning of HTTP_X_PURPOSE?

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

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

发布评论

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

评论(2

野侃 2024-08-12 20:44:27

“X-Purpose:预览”标题绝对是 Safari 4 顶级网站的东西。 “热门站点”页面尝试显示最喜欢的页面的实时缩略图。如果在选项卡中打开最喜欢的页面,它会从该页面的当前版本中获取缩略图。如果某个页面在打开的选项卡中不可用,并且缩略图已经过时*,它会发出后台请求以获取该页面的当前版本。

X-Purpose:预览标头仅附加到 base URL 的 HTTP 请求。它不附加到页面引用的资源(JS/CSS/images/flash)。

我刚刚在这里写了一篇关于此的博客文章: https://web.archive.org/web/20131115045854/https://web.archive.org/web/20131115045854/https:/ /sunpig.com/martin/archives/2010/01/08/how-to-detect-a-page-request-from-safari-4s-top-sites-feature.html

(*我没有探索了其“足够过时”的标准。)

The "X-Purpose: preview" header is definitely a Safari 4 top sites thing. The Top Sites page tries to show a live-ish thumbnail of the favourite pages. If favourite page is open in a tab, it grabs a thumbnail from the current version of the page. If a page is not available in an open tab, and the thumbnail is sufficiently out of date*, it makes a background request to get the current version of the page.

The X-Purpose: preview header is only attached to the HTTP request for the base URL. It is not attached to the resources (JS/CSS/images/flash) referenced on the page.

I've just written a blog entry on this over here: https://web.archive.org/web/20131115045854/https://sunpig.com/martin/archives/2010/01/08/how-to-detect-a-page-request-from-safari-4s-top-sites-feature.html

(* I haven't explored its criteria for "sufficiently out of date" yet.)

久伴你 2024-08-12 20:44:27

渲染 Safari 4.0 热门站点显示模式时可能会发送?没有测试过,只是猜测。

Might be sent when rendering for the Safari 4.0 Top Sites display mode? Haven't tested, just a guess.

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