2

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

when I run the code below and then I check headers in my browser the Expiration date really confuse me -> Expires:Thu, 19 Nov 1981 08:52:00 GMT<-, because I have created this file few minutes before. Could you tell me what does it mean?

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

Thanks!

Pooya sanaei
  • 331
  • 2
  • 8

2 Answers2

3

The significance of this Date is the Sascha Schumann birthday who Developed this code.

You Can Change it 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);
}
Parsa Mir Hassannia
  • 351
  • 2
  • 6
  • 17
1
  1. Check if you have max-age setting also. If a response includes both an Expires header and a max-age directive, the max-age directive overrides the Expires header, even if the Expires header is more restrictive.

  2. Also check if you timezone set for your server. That may also create some confusion.

  3. Check for cache:no-cache setting. This should be commented in case you are using expire-headers setting.

user3227262
  • 563
  • 1
  • 6
  • 16