cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PHP scripts caching in Firefox v101.0.1

kuhlaid
Making moves

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.

2 REPLIES 2

KevinBrosnan
Employee
Employee

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

jscher2000
Leader

@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.