0
当我指定:PHP指定的Cache-Control导致双最大年龄
header('Cache-Control: max-age=31557600');
结果标题是
Cache-Control: max-age=31557600, max-age=0
它似乎还在努力,但似乎什么PHP正在做的是如果我没有指定标题,则将我的Cache-Control标题与它发送的内容相结合。
有没有办法在PHP中摧毁第二个max-age = 0?
您是否尝试过将'header'的第二个参数设置为true,看看它是否改变了什么? – CBroe 2015-02-24 13:26:01
是的,它没有效果。我首先尝试了header_remove,结果没有任何Cache-Control头。 – 2015-02-24 13:32:29
在你的'header'调用之后做'var_dump(headers_list());'是否已经把结果搞乱了?否则,它可能不是PHP在这里做错了事,但稍后它会被网络服务器或传输过程所损坏。 – CBroe 2015-02-24 13:39:32