HTTP 1.0 指令仍然相关吗?

发布于 2024-12-23 18:13:40 字数 469 浏览 3 评论 0原文

我最近花了一些时间寻找防止浏览器缓存具有动态内容的页面的最佳实践。在 StackOverflow 上的一篇文章中,有人建议查看此页面: http:// palisade.plynt.com/issues/2008Jul/cache-control-attributes/

这篇文章来自 2008 年,提到了遗留的 HTTP 1.0“Pragma”和“过期”属性。然而,HTTP 1.1 已经存在了一段时间了。我认为将“Pragma”和“Expires”扔到响应标头中没有什么坏处,但出于好奇,还有理由这样做吗?基本上,假设 HTTP 1.1 支持安全吗?我在网上查找信息时遇到了一些麻烦,但听起来 IE 从版本 4 或 5 开始就已经支持,而像 Firefox 这样的浏览器似乎不再有 HTTP 1.0 选项。想法?

I recently spent some time looking for best practices on preventing browsers from caching pages with dynamic content. In a post here on StackOverflow, someone suggested checking out this page: http://palisade.plynt.com/issues/2008Jul/cache-control-attributes/

The article is from 2008 and mentions the legacy HTTP 1.0 "Pragma" and "Expires" properties. However, HTTP 1.1 has been around for a while now. I suppose there is no harm in throwing "Pragma" and "Expires" onto response headers but out of curiosity, is there still a reason to? Basically, is it safe yet to assume HTTP 1.1 support? I had some trouble finding info online but it sounds like support has existed in IE since version 4 or 5 and browsers like Firefox don't seem to have HTTP 1.0 options anymore. Thoughts?

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

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

发布评论

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

评论(1

哥,最终变帅啦 2024-12-30 18:13:40

是的,任何特定于 HTTP 1.0 的内容都不需要使用现代浏览器。由于许多其他原因,大多数网络无法使用仅支持 HTTP 1.0 的浏览器使用。

哦,是的,@Frederick 提出了一个很好的观点。有 Squid长期以来只有 HTTP 1.0。那里有很多这样的事情。

Yes, anything specific to HTTP 1.0 you will not need to work with modern browsers. And most of the web is unusable with the sort of browsers that supported only HTTP 1.0 for many other reasons.

Oh yes, @Frederick brings up a good point. There is Squid which has long been HTTP 1.0 only. And there is a lot of that out there.

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