06-15-2022 12:19 PM
I'm scratching my head as to why Firefox would cache a request to a PHP script. I have never had this happen in years of PHP development. Even a Shift+Reload on the browser would not release the cache. Only after I cleared the site cache in Firefox did the correct PHP output display. Is this a bug in Firefox or some new caching feature I need to know about? I had no idea where to begin to debug this problem, nor how to reproduce it now the site cache is cleared. Is there is a caching header, etc. I need to send with PHP responses so Firefox does not cache my PHP scripts?
I would appreciate any insights.
06-21-2022 11:05 AM
If you are doing web development then you may want to enable the disable HTTP cache setting in the devtools. https://firefox-source-docs.mozilla.org/devtools-user/settings/index.html
06-21-2022 12:35 PM
@kuhlaid wrote:Is there is a caching header, etc. I need to send with PHP responses so Firefox does not cache my PHP scripts?
Try
header("Cache-Control: no-store");
if you don't want browsers to cache the response.
If that isn't sufficient, is it possible your site has any caches that Firefox might be hitting? This can be an issue with WordPress sites, but I don't know about others.