Switch language

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




cache_javascript_headers [ WordPress Function ]

cache_javascript_headers ( No parameters )
Defined at:



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

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



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