Bugzilla – Attachment 19750 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.74 KB, created by
Jonathan Druart
on 2013-07-18 08:30:22 UTC
(
hide
)
Description:
Bug 10411: add cache control headers for static resources (Debian package)
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-07-18 08:30:22 UTC
Size:
1.74 KB
patch
obsolete
>From 50ad1bbdc05c537b961099beab8aeb05d28d4a6b 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> >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > debian/templates/apache-shared.conf | 7 +++++++ > 1 file changed, 7 insertions(+) > >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.10.4
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