Posted By

kayue on 12/31/10


Tagged


Versions (?)

gzip Javascript


 / Published in: PHP
 

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

Report this snippet  

You need to login to post a comment.