【问题标题】:What are the various aspects with which a request is matched in a browser's cache?请求在浏览器缓存中匹配的各个方面是什么?
【发布时间】:2014-12-28 23:09:30
【问题描述】:

以下哪些请求在浏览器的缓存中被认为是不同的?

a) GET http://mywebsite.com/home
b) GET http://www.mywebsite.com/home
c) POST http://mywebsite.com/home
d) POST http://www.mywebsite.com/home
e) GET http://mywebsite.com/home?param=testparam
f) POST http://mywebsite.com/home?param=testparam

假设如果请求仅在标头中有所不同,它是否被认为是不同的? 前任。是

Accept: text/xml
GET http://mywebsite.com/home?param=testparam

不同于

Accept: text/json
GET http://mywebsite.com/home?param=testparam

如果它们没有不同,有没有办法让浏览器根据 HTTP 动词/标头将它们视为不同的请求?

是否有定义浏览器这种行为的 RFC 规范?

谢谢!

【问题讨论】:

标签: javascript html http browser user-agent


【解决方案1】:

他们都是不同的。规范性规范确实是 RFC 7234。(特别是,请阅读“Vary”标头字段)。

【讨论】:

    猜你喜欢
    • 2010-10-16
    • 1970-01-01
    • 1970-01-01
    • 2013-11-05
    • 2014-03-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多