Browser cache management during local development
While testing in development, how can you disable cac开发者_StackOverflowhe for all your local scripts/styles, and keep the cache working for all the external scripts/styles? Preferably firefox
Basically when making changes to css, js, or sprite files on my site I'm developing, I need to reload them frequently, but the external hosted scripts/images/styles like google maps, jquery etc will make the wait time up to 5-10 seconds every time (this is mainly due to the fact that I am located in a Country with poor internet access)
You could set appropriate HTTP caching directives (expecially ETag, Cache-Control and Expires) for your local site.
For Apache you can use Header
to unset ETag, and set Cache-Control and Expires with appropriate values:
Header unset ETag
Header set Cache-Control no-store, max-age=0
Header set Expires 0
精彩评论