Had a problem with the dynamic site (100% ajax) not updating when it goes to different pages. I just want to cache the html pages. The css and js is unchanging, I WANT that to cache you know?
I added the following php
Response::header('Cache-Control', 'no-store, private, no-cache, must-revalidate'); // HTTP/1.1
Response::header('Cache-Control', 'pre-check=0, post-check=0, max-age=0, max-stale = 0', false); // HTTP/1.1
Response::header('Pragma', ' public');
Response::header('Expires', 'Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
Response::header('Expires', '0', false);
Response::header('Last-Modified', gmdate('D, d M Y H:i:s') . ' GMT');
Response::header('Pragma', 'no-cache');
and the following html
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
will it disrupt the css/js or JUST make the html have to reload.
?t=<?php echo time(); ?>to script and CSS URLs. This will disable caching 100%.