Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: nocache_headers

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1575 function wp_get_nocache_headers() {
1576      $headers = array(
1577           'Expires' => 'Wed, 11 Jan 1984 05:00:00 GMT',
1578           'Last-Modified' => gmdate( 'D, d M Y H:i:s' ) . ' GMT',
1579           'Cache-Control' => 'no-cache, must-revalidate, max-age=0',
1580           'Pragma' => 'no-cache',
1581      );
1582
1583      if ( function_exists('apply_filters') ) {
1584           $headers = apply_filters('nocache_headers', $headers);
1585      }
1586      return $headers;
1587 }
1588
1589 /**
1590  * Sets the headers to prevent caching for the different browsers.
1591  *
1592  * Different browsers support different nocache headers, so several headers must
1593  * be sent so that all of them get the point that no caching should occur.