gpt4 book ai didi

php - HTTP header : Expires

转载 作者:可可西里 更新时间:2023-11-01 16:28:15 29 4
gpt4 key购买 nike

Expires Headers are rather simple in how they work. They tell the browser how long to store a file in the cache so subsequent page views and visits they don't have to download the file again. You are right to assume Expires Headers don't improve page speed for a first time visit as this visitor would have to download all the files for the first time. Using Expires Headers helps increase load times for returning visitors

当我运行下面的代码然后在浏览器中检查标题时,过期日期真的让我感到困惑 -> Expires:Thu, 19 Nov 1981 08:52:00 GMT<-,因为我几分钟前创建了这个文件。你能告诉我这是什么意思吗?

<?php 
session_cache_limiter('private');
session_start();
?>

谢谢!

最佳答案

这个日期的意义在于开发此代码的 Sascha Schumann 生日。

您可以从 session.c 更改它:

Authors: Sascha Schumann <sascha@schumann.cx> 
Andrei Zmievski <andrei@php.net>
// ...
CACHE_LIMITER_FUNC(private)
{
ADD_HEADER("Expires: Thu, 19 Nov 1981 08:52:00 GMT");
CACHE_LIMITER(private_no_expire)(TSRMLS_C);
}

关于php - HTTP header : Expires,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32307268/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com