GET被浏览器主动缓存 ?

???
我咋重来没发现我的get在没有设置相应相应头的情况下被主动缓存?
什么叫主动缓存?
???

w3c school里说
GET requests can be cached
GET requests remain in the browser history
GET requests can be bookmarked
GET requests should never be used when dealing with sensitive data
GET requests have length restrictions
GET requests are only used to request data (not modify)

这里说的的can be cached怎么到中文就成主动cache了?
还是我哪里没弄明白?
大哥们指点指点

阅读 3.6k
3 个回答

没看文章,单单讨论这个问题而言,按照RFC标准定义RFC-7234来说,缓存还真是默认打开的。

Although caching is an entirely OPTIONAL feature of HTTP, it can be assumed that reusing a cached response is desirable and that such reuse is the default behavior when no requirement or local configuration prevents it. Therefore, HTTP cache requirements are focused on preventing a cache from either storing a non-reusable response or reusing a stored response inappropriately, rather than mandating that caches always store and reuse particular responses.

当然,“主动缓存”不是一个好的翻译,和默认会进行缓存不能完全说是同一个意思。

不能把,你不设置头,浏览器干嘛给你缓存,只是说get可以,哪里体现主动缓存了

这个翻译太操蛋了吧.. can be cached 不是应该翻译成 可以被缓存 吗?

w3cschool 里的文章,有好多都写的过于简单,翻译的模棱两可的.

这种规范还是直接去看 RFC 标准定义里的说法把.

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题