1

We did a very big Update on our Website and now we have issues with some of our Clients that the CSS broke. We need to implement a way to refresh the Browser Cache. We are also not able to add a version to the end of the Files.

1 Answers1

0

Specify the headers...

header("Expires: Tue, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); 

They must be before any output

Jay Blanchard
  • 34,243
  • 16
  • 77
  • 119
hexYeah
  • 1,040
  • 2
  • 14
  • 24
  • Do or do not, there is no "try". A ***good answer*** will always have an explanation of what was done and why it was done in such a manner, not only for the OP but for future visitors to SO. – Jay Blanchard Jan 12 '18 at 20:41
  • I was trying to put a funny spin on it.. I guess it's hard to get thru text only. You are right my answer should be more explanatory... – hexYeah Jan 12 '18 at 20:45