cache_javascript_headers [ WordPress Function ]
cache_javascript_headers ( No parameters )
| Defined at: |
|
Soorgelijke functies: nocache_headers, do_activate_header, cache_users, wp_get_nocache_headers, funky_javascript_fix
Set the headers for caching for 10 days with JavaScript content type.
Source
<?php
function cache_javascript_headers() {
$expiresOffset = 864000; // 10 days
header( "Content-Type: text/javascript; charset=" . get_bloginfo( 'charset' ) );
header( "Vary: Accept-Encoding" ); // Handle proxies
header( "Expires: " . gmdate( "D, d M Y H:i:s", time() + $expiresOffset ) . " GMT" );
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/cache javascript headers « WordPress Codex
Description. Set the headers for caching for 10 days with JavaScript content type. Usage. <?php cache_javascript_headers() ?> Parameters. None.
codex.wordpress.org - Docs for page functions.php
void cache_javascript_headers (). current_time (line 59). Retrieve the current time based on specified type. The 'mysql' type will return the time in the format for ...
phpdoc.wordpress.org - cache_javascript_headers (WordPress Function) - WPSeek.com
WordPress lookup for cache_javascript_headers, a WordPress Function. wpseek .com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - cache_javascript_headers() WordPress function reference ...
Set the headers for caching for 10 days with JavaScript content type.
queryposts.com