Bugzilla – Attachment 19088 Details for
Bug 10411
Add cache control headers to static resources in the apache config
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10411: add cache control headers for static resources (Debian package)
Bug-10411-add-cache-control-headers-for-static-res.patch (text/plain), 1.70 KB, created by
Galen Charlton
on 2013-06-17 21:12:16 UTC
(
hide
)
Description:
Bug 10411: add cache control headers for static resources (Debian package)
Filename:
MIME Type:
Creator:
Galen Charlton
Created:
2013-06-17 21:12:16 UTC
Size:
1.70 KB
patch
obsolete
>From 5a7f8bd8c056291569bd9cb24a82c55ccdaaccb7 Mon Sep 17 00:00:00 2001 >From: Robin Sheat <robin@catalyst.net.nz> >Date: Wed, 5 Jun 2013 17:50:29 +1200 >Subject: [PATCH] Bug 10411: add cache control headers for static resources (Debian package) > >This adds caching directives to the static resources so that the browser >doesn't ask about them all the time. > >By default, Debian apache doesn't have the required module (mod_expires) >enabled, and so this patch will have no effect. In order to enable this >function, run: > >a2enmod expires > >and restart apache. > >Test Plan: >* Using firebug or equivalent, load a page. >* Note that none of the images, css, or js files have a Cache-Control or > Expires header set. >* Add this patch, redeploy the package with it (or overwrite the > apache-share.conf file) enable the 'expires' module, restart apache. >* Force-reload the page >* Note that the images, css, js now have Cache-Control and Expires set > for 12 hours into the future. > >Signed-off-by: Galen Charlton <gmc@esilibrary.com> >--- > debian/templates/apache-shared.conf | 7 +++++++ > 1 files changed, 7 insertions(+), 0 deletions(-) > >diff --git a/debian/templates/apache-shared.conf b/debian/templates/apache-shared.conf >index 077bd7f..33c6633 100644 >--- a/debian/templates/apache-shared.conf >+++ b/debian/templates/apache-shared.conf >@@ -56,6 +56,13 @@ SetEnv PERL5LIB "/usr/share/koha/lib" > </IfModule> > </IfModule> > >+<IfModule mod_expires.c> >+ ExpiresActive on >+ ExpiresByType text/css "access plus 12 hours" >+ ExpiresByType application/javascript "access plus 12 hours" >+ ExpiresByType image/png "access plus 12 hours" >+ ExpiresByType image/gif "access plus 12 hours" >+</IfModule> > > Options +FollowSymLinks > >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10411
:
18653
|
19088
|
19750