I have modified js and css files in my website. But browser still fetch the contents from local cache because browser has stored it. I want to fetch the fresh content from the server without clearing the local cache.
Previously max-age header was set to 1 year. Now I have set it to 0. Still it does not fetch fresh content.
Is there any way I will send headers from server to the browser and it will fetch fresh contents, ignoring previous files stored in local cache.
Thank you
Best Answer
Send
Cache-control: no-cache
to tell receiving browsers to release a cache entry. This has to be sent for every object in the cache so is probably better done with a script.