Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_get_nocache_headers [ WordPress Function ]

wp_get_nocache_headers ( No parameters )
Uses:
Returns:
  • (array) The associative array of header names and field values.
Defined at:



Gets the header information to prevent caching.

The several different headers cover the different ways cache prevention is handled by different browsers

Source


<?php
function wp_get_nocache_headers() {
    
$headers = array(
        
'Expires' => 'Wed, 11 Jan 1984 05:00:00 GMT',
        
'Last-Modified' => gmdate'D, d M Y H:i:s' ) . ' GMT',
        
'Cache-Control' => 'no-cache, must-revalidate, max-age=0',
        
'Pragma' => 'no-cache',
    );

    if ( 
function_exists('apply_filters') ) {
        
$headers = (array) apply_filters('nocache_headers'$headers);
    }
    return 
$headers;
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics