Quantcast
Channel: Nginx Forum - Other discussion
Viewing all articles
Browse latest Browse all 972

Caching and PHP ...

$
0
0
Hello,

I am just migrating from Apache and am wondering how caching works for my PHP scripts.

If I go to my website on Apache, the response headers include:

```
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
```

which obviously stops the browser from doing any caching.

However on Nginx the response headers are:

```
HTTP/1.1 200 OK
Server: nginx/1.19.1
Date: Wed, 12 Aug 2020 19:21:19 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
```

So my question is this - what in those response headers stops the browser from caching the output? The browser doesn't cache by the way, I am just trying to understand why ...

Thanks,

Martin

Viewing all articles
Browse latest Browse all 972

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>