[Rt-commit] r5528 - in rt/branches/3.6-RELEASE: .
trs at bestpractical.com
trs at bestpractical.com
Tue Jul 4 17:59:20 EDT 2006
Author: trs
Date: Tue Jul 4 17:59:19 2006
New Revision: 5528
Modified:
rt/branches/3.6-RELEASE/ (props changed)
rt/branches/3.6-RELEASE/html/NoAuth/css/autohandler
Log:
r13934 at zot: tom | 2006-07-04 17:59:07 -0400
Add an HTTP "Expires" header to CSS files so they expire in a year (and aren't reloaded on every request)
Modified: rt/branches/3.6-RELEASE/html/NoAuth/css/autohandler
==============================================================================
--- rt/branches/3.6-RELEASE/html/NoAuth/css/autohandler (original)
+++ rt/branches/3.6-RELEASE/html/NoAuth/css/autohandler Tue Jul 4 17:59:19 2006
@@ -45,6 +45,17 @@
%# END BPS TAGGED BLOCK }}}
<%init>
$r->content_type('text/css');
+
+my @DoW = qw(Sun Mon Tue Wed Thu Fri Sat);
+my @MoY = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
+my ($sec, $min, $hour, $mday, $mon, $year, $wday) = gmtime( time() + 31536000 );
+
+my $expires = sprintf("%s, %02d %s %04d %02d:%02d:%02d GMT",
+ $DoW[$wday],
+ $mday, $MoY[$mon], $year+1900,
+ $hour, $min, $sec);
+
+$r->header_out( 'Expires' => $expires );
$m->call_next();
return();
</%init>
More information about the Rt-commit
mailing list