[YSlow] Added Expires header on jsres.php
authorDan
Sat, 07 Jun 2008 12:40:53 -0400
changeset 559 cfdc0aa8af50
parent 558 fd082123f2f4
child 560 8981dcf7d485
[YSlow] Added Expires header on jsres.php
includes/clientside/jsres.php
--- a/includes/clientside/jsres.php	Sat Jun 07 12:40:29 2008 -0400
+++ b/includes/clientside/jsres.php	Sat Jun 07 12:40:53 2008 -0400
@@ -71,6 +71,7 @@
   'pwstrength.js',
   'sha256.js',
   'flyin.js',
+  'rank-manager.js',
   'template-compiler.js',
   'toolbar.js',
   'diffiehellman.js',
@@ -167,12 +168,16 @@
   }
 }
 
+// generate expires header
+$expires = date('r', mktime(-1, -1, -1, -1, -1, intval(date('y'))+1));
+
 $everything = str_replace('/* JavaScriptCompressor 0.8 [www.devpro.it], thanks to Dean Edwards for idea [dean.edwards.name] */' . "\r\n", '', $everything);
 
 $date = date('r', $apex);
 header("Date: $date");
 header("Last-Modified: $date");
 header("ETag: \"$etag\"");
+header("Expires: $expires");
 
 echo $everything;