includes/clientside/jsres.php
changeset 798 ddfc1b554a08
parent 780 f65e35566b63
child 800 9cdfe82c56cd
equal deleted inserted replaced
797:8d2a40574bbc 798:ddfc1b554a08
   253     exit();
   253     exit();
   254   }
   254   }
   255 }
   255 }
   256 
   256 
   257 // generate expires header
   257 // generate expires header
   258 $expires = date('r', mktime(-1, -1, -1, -1, -1, intval(date('y'))+1));
   258 $expires = date('r', mktime(0, 0, 0, intval(date('m')), intval(date('d')), intval(date('y'))+1));
   259 
   259 
   260 $everything = str_replace('/* JavaScriptCompressor 0.8 [www.devpro.it], thanks to Dean Edwards for idea [dean.edwards.name] */' . "\r\n", '', $everything);
   260 $everything = str_replace('/* JavaScriptCompressor 0.8 [www.devpro.it], thanks to Dean Edwards for idea [dean.edwards.name] */' . "\r\n", '', $everything);
   261 
   261 
   262 $date = date('r', $apex);
   262 $date = date('r', $apex);
   263 
   263 
   268 
   268 
   269 header("Date: $date");
   269 header("Date: $date");
   270 header("Last-Modified: $date");
   270 header("Last-Modified: $date");
   271 header("ETag: \"$etag\"");
   271 header("ETag: \"$etag\"");
   272 header("Expires: $expires");
   272 header("Expires: $expires");
       
   273 header("Content-Length: " . strlen($everything));
   273 
   274 
   274 $local_end = microtime_float();
   275 $local_end = microtime_float();
   275 $local_gentime = $local_end - $local_start;
   276 $local_gentime = $local_end - $local_start;
   276 $local_gentime = round($local_gentime, 5);
   277 $local_gentime = round($local_gentime, 5);
   277 header("X-Performance: generated in $local_gentime seconds");
   278 header("X-Performance: generated in $local_gentime seconds");