Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the various aspects with which a request is matched in a browser's cache?

Which of the following requests are considered different in a browser's cache?

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

Suppose if the the request varies only in headers, is it considered different? Ex. Is

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

different from

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

If they aren't different, is there a way I can make the browser treat them as different requests based on the HTTP Verb / Header?

Is there an RFC spec which defines this behavior for browsers?

Thanks!

like image 875
Sornakumar Avatar asked Dec 11 '25 21:12

Sornakumar


1 Answers

All of them a different. The normative spec indeed is RFC 7234. (In particular, read about the "Vary" header field).

like image 189
Julian Reschke Avatar answered Dec 14 '25 09:12

Julian Reschke



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!