Same name and namespace in other branches
  1. 4.6.x includes/bootstrap.inc \drupal_page_header()
  2. 4.7.x includes/bootstrap.inc \drupal_page_header()
  3. 5.x includes/bootstrap.inc \drupal_page_header()
  4. 7.x includes/bootstrap.inc \drupal_page_header()

Set HTTP headers in preparation for a page response.

Authenticated users are always given a 'no-cache' header, and will fetch a fresh page on every request. This prevents authenticated users seeing locally cached pages that show them as logged out.

See also

page_set_cache()

2 calls to drupal_page_header()
install_main in ./install.php
The Drupal installation happens in a series of steps. We begin by verifying that the current environment meets our minimum requirements. We then go on to verify that settings.php is properly configured. From there we connect to the configured database…
page_cache_fastpath in developer/hooks/core.php
Outputs a cached page.

File

includes/bootstrap.inc, line 735
Functions that need to be loaded on every Drupal request.

Code

function drupal_page_header() {
  header("Expires: Sun, 19 Nov 1978 05:00:00 GMT");
  header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
  header("Cache-Control: store, no-cache, must-revalidate");
  header("Cache-Control: post-check=0, pre-check=0", FALSE);
}