如何从PHP中的Cache标头中删除max-age
参数?
如果我在session.cache_expire
中注释掉PHP.ini
变量,则只会将max-age设置为10800.
答案 0 :(得分:0)
session_cache_expire(0);
或者如果要删除缓存,请使用:
<?php
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
?>