In order to get best caching experience you need to send Last-Modified header and reply with status 304 and empty body if browser sendscache php cache images in php cache images of browser. Comment on it.For more information, see Chrome and NPAPI (blog.chromium.org). Cache-Control is a HTTP header that specifies how long and in what manner a file will be cached by browsers (and other things too). chrome cache header. HTTP request header information.lt, amp, cache control, page cache, foreigners, estimation, fopen, mp, longitude, cached files, cached content, pragma, file mime, fwrite, acos, php tipsApril 6. I am trying to serve a PHP file output with HTTP Headers configured so the content will NOT be served from cache in Chrome. If I go to Dev tools (in Chrome), and mark the "Disable cache" option, then it works. Remember that usually, there are no caching headers sent for PHP files.Reference — What does this symbol mean in PHP? Disabling Chrome cache for website development. How to fix Headers already sent error in PHP. This page contains top rated real world PHP examples of function isbrowser chrome extracted from open source projects. Suppress "Pragma: no-cache" header. else if (!isset(gallowfile cache)) . and it doesnt make one scrap of difference. When returning to the home page, those 4 images at the top right still remain the same (in Google Chrome). As Victor pointed out, I had the "Pragma: no-cache" header set. The header was somehow set by PHP.
I worked with our webserver admin and we had managed to unset the header with Apache. Chromium) caches the text file.If GET data.txt is handled by a script (perl, php, java, etc) then setting those header can be done from the script itself (has to be executed before any content is sent out). I have a PHP page that performs a 302 redirect to another php page on the box, the new page returns cache/e-tag headers.So it basically just serves the file from disk if it has one, sounds like aggressive caching from chrome. PHP cache cache header Ive been through over 100 answers here, lots to try, NOTHING working?? Have a PHP based site.