gpt4 book ai didi

http - Pragma 和 Cache-Control header 之间的区别?

转载 作者:可可西里 更新时间:2023-11-01 15:03:07 27 4
gpt4 key购买 nike

我在 Wikipedia 上阅读了有关 Pragma header 的信息其中说:

"The Pragma: no-cache header field is an HTTP/1.0 header intended for use in requests. It is a means for the browser to tell the server and any intermediate caches that it wants a fresh version of the resource, not for the server to tell the browser not to cache the resource. Some user agents do pay attention to this header in responses, but the HTTP/1.1 RFC specifically warns against relying on this behavior."

但是我一直不明白它的作用是什么?值为 no-cacheCache-Control header 与值为 no-cache< 的 Pragma 有什么区别?

最佳答案

Pragma 是 HTTP/1.0 实现,cache-control 是相同概念的 HTTP/1.1 实现。它们都是为了防止客户端缓存响应。较旧的客户端可能不支持 HTTP/1.1,这就是该 header 仍在使用的原因。

关于http - Pragma 和 Cache-Control header 之间的区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10314174/

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