I’m wandering how does browser caches the javascript files.
I have utility.js and I use it on multiple pages.
I know that when I go to http://www.some_host/page1.html the utility.js is cached for that request.
What happens if I go to different page http://www.some_host/page2.html, utility.js is requested again from server or take it from browser cache?
I’m wandering how does browser caches the javascript files. I have utility.js and I
Share
Everything is cached based on its own URI. It doesn’t matter what caused the browser to load it (unless you have something like
Vary: refererin the headers, which I’ve never seen)