Force browser to clear cache after deployment while deployment html and css changes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 years ago
Whenever we deploy Html and CSS changes. and those are not reflecting to end customer without full refresh (ctrl + f5) or clear history of there browser.

Anyone is facing such kind of issue?

What is the solution for this? does any code available that we put after deployment in order to load content from server instead browser cache and remove after some days.

we already tried this and no luck
<meta http-equiv=“Pragma” content=”no-cache”>
<meta http-equiv=“Expires” content=”-1″>
<meta http-equiv=“CACHE-CONTROL” content=”NO-CACHE”>
2 years ago
I found solution.

Cache busting via params

The param ?v=1.123 indicates a query string, and the browser will therefore think it is a new path from, say, ?v=1.0. Thus causing it to load from file, not from cache. As you want.

And, the browser will assume that the source will stay the same next time you call ?v=1.123 and should cache it with that string. So it will remain cached, however your server is set up, until you move to ?v=1.124 or so on.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.