php GZIP javascript

<?php
    ob_start('ob_gzhandler');
    header("Cache-Control: public");
    header("Pragma: cache");
    $offset = 60*60*24*60;
    $ExpStr = "Expires: ".gmdate("D, d M Y H:i:s",time() + $offset)." GMT";
    $LmStr = "Last-Modified: ".gmdate("D, d M Y H:i:s",filemtime(__FILE__))." GMT";
    header($ExpStr);
    header($LmStr);
    header('Content-Type: text/javascript; charset: UTF-8');
?>

你可能感兴趣的:(JavaScript,PHP,cache)