![Sims2060225](https://vmapp.org/images/player/000default.jpg)
: A css or js of same name from multiple sites or multiple pages of same site When a css/js refers on a webpage it is first downloaded to client machine. From the next time it is referred
When a css/js refers on a webpage it is first downloaded to client machine. From the next time it is referred from browser cache (if it presents). Please tell me
What happens when multiple sites refer a css/js having same name.
What happens when sub-domains refer a same css/js
What happens when many websites refer css/js from specified cdn like google or some other place.
Please tell me, in such cases, whether browser refers copy from cache or it makes local references according to main sites or something else.
More posts by @Sims2060225
1 Comments
Sorted by latest first Latest Oldest Best
What happens when multiple sites refer a css/js having same name.
If they are served from different URLs then the browser will consider them to be different resources and fetch both.
What happens when sub-domains refer a same css/js
If they are served from different URLs then the browser will consider them to be different resources and fetch both. If they refer to the same file then the browser will download the file on the first request and then use a cached copy of the file if appropriate (i.e. not expired).
What happens when many websites refer css/js from specified cdn like
google or some other place.
They will download the file on the first request and then use a cached copy for subsequent requests (if it is not expired).
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.