Wednesday, 2 October 2013

How does client-side caching of JavaScript work?

How does client-side caching of JavaScript work?

I was wondering how browsers determine when to fetch a script from the
server vs from the cache...
When developing, I never have to clear my cache to see changes. However,
some people often experience problems with their browser caching scripts
and not fetching a newer version. I know you can append a query string to
the filepath to force it to fetch from the server, but in this question
I'm more interested in understanding the mechanics behind the problem. Why
does the cache interfere only sometimes and why does it not effect
everyone the same?
Also, how might this differ from browser to browser? IE, Firefox, Chrome,
etc...
Thanks

No comments:

Post a Comment