Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1590

Will browser pull from cache if the same resource is being requested by a different origin?

$
0
0

Let's say you have a resource, could be an image, could be jQuery from a cdn. This resource is hosted at some 3rd party url, like https://example-cdn.com/resource.ext. Let's also assume it is cacheable (whatever that means--let me know if that is a non-trivial detail).

When https://website-a.com requests the resource (let's assume it was included in the html directly), it takes some time to load, but then the browser caches it for faster load next time.

Now, https://website-b.com is also including that resource in its html, using the exact same url (https://example-cdn.com/resource.ext).

My question is this: will the browser reach for the cached resource (because it was already fetched while loading https://website-a.com), or is there some reason that it would not be able to find it in the cache and have to load it over the network all over again?

Edit: This stackexchange answer seems to contain some related information. Can anyone verify that this answer is correct in all its assertions about caching? https://webmasters.stackexchange.com/a/84685


Viewing all articles
Browse latest Browse all 1590


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>