関数 wp_get_nocache_headers()
定義ファイル :/blog/wp-includes/functions.php 6
wp_get_nocache_headers()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | /** * Get the header information to prevent caching. * * The several different headers cover the different ways cache prevention * is handled by different browsers * * @since 2.8.0 * * @return array The associative array of header names and field values. */ function wp_get_nocache_headers() { $headers = array( 'Expires' => 'Wed, 11 Jan 1984 05:00:00 GMT', 'Cache-Control' => 'no-cache, must-revalidate, max-age=0', 'Pragma' => 'no-cache', ); if ( function_exists('apply_filters') ) { /** * Filter the cache-controlling headers. * * @since 2.8.0 * * @see wp_get_nocache_headers() * * @param array $headers { * Header names and field values. * * @type string $Expires Expires header. * @type string $Cache-Control Cache-Control header. * @type string $Pragma Pragma header. * } */ $headers = (array) apply_filters( 'nocache_headers', $headers ); } $headers['Last-Modified'] = false; return $headers; } |