浏览器是否忽略html/php缓存头?

浏览器是否忽略html/php缓存头?,php,caching,browser,browser-cache,cache-control,Php,Caching,Browser,Browser Cache,Cache Control,我对缓存头感到困惑。 我试图让浏览器缓存我的php/html页面,因为它们大多是静态的,并且在一个月左右不会改变 url看起来像:example.com/article url,在后台是一个php页面,像/article\u url.php 我在PHP中尝试过: $cache_seconds = 60*60*24*30; header("Expires: ".gmdate('D, d M Y H:i:s \G\M\T', time()+$cache_seconds)); header("Cach

我对缓存头感到困惑。 我试图让浏览器缓存我的php/html页面,因为它们大多是静态的,并且在一个月左右不会改变

url看起来像:
example.com/article url
,在后台是一个php页面,像
/article\u url.php

我在PHP中尝试过:

$cache_seconds = 60*60*24*30;
header("Expires: ".gmdate('D, d M Y H:i:s \G\M\T', time()+$cache_seconds));
header("Cache-Control:public, max-age=".$cache_seconds); 
在浏览器调试窗口中,我可以看到该页面确实将在下个月到期:

Request URL: https://www.example.com/article-url
Request Method: GET
Status Code: 200 
Referrer Policy: no-referrer-when-downgrade
cache-control: public, max-age=2592000
content-encoding: gzip
content-length: 2352
content-type: text/html
date: Mon, 25 Nov 2019 14:23:40 GMT
expires: Wed, 25 Dec 2019 14:23:40 GMT
server: nginx
status: 200
vary: Accept-Encoding
但如果我再次访问该页面,我会看到它再次生成,我让它在页脚中打印请求时间戳,我可以看到页面在每次页面加载时再次生成。 我希望浏览器从缓存中显示完全相同的页面。
我做错了什么?

检查这个答案:根据我的测试,这不是Chrome问题,它也发生在Chrome或Mozilla上,我单击访问另一个页面,然后单击主页链接,时间戳是新的(页面已重新生成)。