Why is the expire header set to some time in the past ('Sun, 11 Mar 1984 12:00:00 GMT') in Drupal 6/ PressFlow and Drupal 7?

drupal.stackexchange https://drupal.stackexchange.com/questions/87419

Frage

I have been trying to understand why the expires header is set to the past. I read the comment In boostrap.inc drupal 6 but I am still a bit confused about it and the relation between expires and vary headers. I looked into this because I am trying to set the expire header in the hope of controlling varnish object cache expiration regardless of TTL. The code reads:

  // HTTP/1.0 proxies do not support the Vary header, so prevent any caching
  // by sending an Expires date in the past. HTTP/1.1 clients ignores the
  // Expires header if a Cache-Control: max-age= directive is specified (see RFC
  // 2616, section 14.9.3).
  $default_headers['Expires'] = 'Sun, 11 Mar 1984 12:00:00 GMT';

Would it affect me if I set the caching headers like expire? I want to do this only for anonymous users.

I posted a varnish question related to this here: https://stackoverflow.com/questions/19121220/how-to-control-how-long-varnish-expire-a-page-from-the-backend

Keine korrekte Lösung

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit drupal.stackexchange
scroll top