wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.
cache_javascript_headers › WordPress Function
Od2.1.0
Przestarzałyn/a
› cache_javascript_headers ( Brak parametrów )
Zdefiniowane na: |
|
Codex: |
Sets the HTTP headers for caching for 10 days with JavaScript content type.
Powiązane Funkcje: nocache_headers, has_custom_header, wp_get_nocache_headers, do_activate_header, cache_users
Źródło
function cache_javascript_headers() { $expires_offset = 10 * DAY_IN_SECONDS; 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() + $expires_offset ) . ' GMT' ); }