wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema
wp_get_nocache_headers › WordPress Function
Desde2.8.0
Obsoleton/a
› wp_get_nocache_headers ( Sem parâmetros )
| Retorna: |
|
| Definido em: |
|
| Codex: | |
| Log de mudanças: |
|
Gets the HTTP header information to prevent caching.
The several different headers cover the different ways cache prevention is handled by different browsers or intermediate caches such as proxy servers.Funções relacionadas: nocache_headers, wp_get_http_headers, wp_cache_decr, _get_non_cached_ids, wp_get_schedules
Fonte
function wp_get_nocache_headers() {
$cache_control = 'no-cache, must-revalidate, max-age=0, no-store, private';
$headers = array(
'Expires' => 'Wed, 11 Jan 1984 05:00:00 GMT',
'Cache-Control' => $cache_control,
);
if ( function_exists( 'apply_filters' ) ) {
/**
* Filters the cache-controlling HTTP headers that are used to prevent caching.
*
* @since 2.8.0
*
* @see wp_get_nocache_headers()
*
* @param array $headers Header names and field values.
*/
$headers = (array) apply_filters( 'nocache_headers', $headers );
}
$headers['Last-Modified'] = false;
return $headers;
}