关于PHP默认Expires: Thu, 19 Nov 1981...的故事

为何PHP不设置Expires头的时候, 默认输出如下的缓存头呢?:Expires: Thu, 19 Nov 1981 08:52:00 GMT答案来自 stackoverflow :It's an attempt to disable caching.这是用于尝试禁用浏览器缓存

为何PHP不设置Expires头的时候, 默认输出如下的缓存头呢?:


Expires: Thu, 19 Nov 1981 08:52:00 GMT


答案来自 stackoverflow :


It's an attempt to disable caching.

这是用于尝试禁用浏览器缓存PHP请求的

The date is the birthday of the developer Sascha Schumann who added the code.

这个日期 是这个块代码开发者 Sascha Schumann 的 生日

File: session.c

Authors: Sascha Schumann < sascha@schumann.cx >

Andrei Zmievski < andrei@php.net >


c// ...

CACHE_LIMITER_FUNC(private)
{
    ADD_HEADER("Expires: Thu, 19 Nov 1981 08:52:00 GMT");
    CACHE_LIMITER(private_no_expire)(TSRMLS_C);
}




Why is “Expires” 1981?

My CRON Job returned an error that CRON job did not work. In that this was there:

Set-Cookie: PHPSESSID=2t2drultihqci4em15nbfmeb63; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-type: text/html

I am wondering why is Expires set to "1981". What is the significance?


It's an attempt to disable caching.

The date is the birthday of the developer Sascha Schumann who added the code.

From 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);
}