Revision: 2317
          http://mrbs.svn.sourceforge.net/mrbs/?rev=2317&view=rev
Author:   cimorrison
Date:     2012-07-06 14:14:59 +0000 (Fri, 06 Jul 2012)
Log Message:
-----------
Added a couple of extra headers to expires_header() to encourage caching

Modified Paths:
--------------
    mrbs/trunk/web/functions.inc

Modified: mrbs/trunk/web/functions.inc
===================================================================
--- mrbs/trunk/web/functions.inc        2012-07-05 15:40:32 UTC (rev 2316)
+++ mrbs/trunk/web/functions.inc        2012-07-06 14:14:59 UTC (rev 2317)
@@ -174,9 +174,13 @@
 
 // A little helper function to send an "Expires" header. Just one
 // parameter, the number of seconds in the future to set the expiry
+// (We also send a couple of extra headers as the "Expires" header alone
+// does not always result in caching.)
 function expires_header($seconds)
 {
   header("Expires: ".rfc1123_date(time()+$seconds));
+  header("Pragma: cache");
+  header("Cache-Control: max-age=$seconds");
 }
 
 // Converts a duration of $dur seconds into a duration of

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to