Make WordPress Core


Ignore:
Timestamp:
08/22/2006 05:31:53 PM (19 years ago)
Author:
ryan
Message:

cache_javascript_headers() from masquerade. fixes #3059 #2799

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r4091 r4109  
    736736    @ header('Cache-Control: no-cache, must-revalidate, max-age=0');
    737737    @ header('Pragma: no-cache');
     738}
     739
     740function cache_javascript_headers() {
     741    $expiresOffset = 864000; // 10 days
     742    header("Content-type: text/javascript; charset=" . get_bloginfo('charset'));
     743    header("Vary: Accept-Encoding"); // Handle proxies
     744    header("Expires: " . gmdate("D, d M Y H:i:s", time() + $expiresOffset) . " GMT");
    738745}
    739746
Note: See TracChangeset for help on using the changeset viewer.