PHP最后修改的头文件未发送


PHP Last-Modified header not sent?

在我的PHP文件的最上面有这个:

<?php
// Set headers
header('Content-Type: text/html; charset=UTF-8');
header('Content-Style-Type: text/css');
header('Content-Script-Type: application/javascript');
header('HTTP/1.1 200 OK');
header('Content-language: en-US');
header('X-Powered-By: ');
header_remove('X-Powered-By');
header('Last-Modified: Tue, 01 Jan 2013 00:00:00 GMT');
header('Cache-Control: no-store, no-cache, max-age=0, must-revalidate');
header('Pragma: no-store, no-cache, max-age=0, must-revalidate');
header('Expires: Tue, 01 Jan 2013 00:00:00 GMT');
?>

所以当我在我的站点的URL上检查Firefox控制台的。NET选项卡时,我看不到Last-Modified标头。有什么建议吗?

你告诉浏览器什么都不缓存,他必须重新验证所有内容。因此,最后修改的标题无关紧要。