Reputation: 6478
For example, if I have a .js file, will browsers have a seperate cached copy of:
http://www.mysite.com/myfile.js
and
https://www.mysite.com/myfile.js
Or will they only cache a single copy?
Upvotes: 2
Views: 188
Reputation: 655319
If the URL is different, different resources are assumed. And this fact does also need to be reflected by the cache. So the two URLs in your example will result in two cache entities.
Besides the URL, caches do also take further information of the request and response into account: with the Vary response header field the server can indicate “the set of request-header fields that fully determines […] whether a cache is permitted to use the response to reply to a subsequent request without revalidation.” So it is possible that there are even more than just two cached entities.
Upvotes: 4