php - Clear limited files from browser cache -
is possible refresh browser cached data when necessary via php code? have complex web application , using browser caching speed loading time/performance of pages.
how can retain advantages of browser caching, still have browser refresh files when necessary? there 2 sets of files - library files need not change, , local, change infrequently. need clear browser cache local files conditionally. possible?
i have code:
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"); and clears entire cache; pointers in direction helpful.
try this,
header("expires: mon, 26 jul 1997 05:00:00 gmt"); header("last-modified: " . gmdate("d, d m y h:i:s") . " gmt"); header("cache-control: private, no-store, no-cache, must-revalidate"); ini_set('session.cache_limiter', 'private'); header("cache-control: post-check=0, pre-check=0", false); header("pragma: no-cache");
Comments
Post a Comment