[Tickets #11017] precompress files in /static

bugs at horde.org bugs at horde.org
Tue Feb 21 00:45:01 UTC 2012


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/11017
------------------------------------------------------------------------------
  Ticket             | 11017
  Created By         | dpa-bugs at aegee.org
  Summary            | precompress files in /static
  Queue              | Horde Base
  Version            | 4.0.13
  Type               | Enhancement
  State              | New
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


dpa-bugs at aegee.org (2012-02-21 00:45) wrote:

In static/ are put the minified .js and .css files, which are sent to  
the user's browser.  If the webserver is configured properly, the  
minified .js/.css files are cached on the user's side and the server  
load on subsequent requests is minified this way.  So far so good.

Another possible optimization is to pre-compress the files in /static,  
so that for each file a .js/css plain and .js.gz/.css.gz version  
exists.  With proper configuration of the webserver, when the client  
ACCEPTs-ENCODING: GZIP, the webserver can check if there is a  
pre-compressed file and sent it to the client, instead of sending  
uncompressed file or compressing everytime the same files on the fly.   
This leads to lower network traffic, lower server load, faster page  
serving from user's perspective.

The instructions for some webservers, how to call the precompressed  
files vary.  For Apache httpd you can find instructions that procees  
.gzip files, for Nginx you have just to say "gzip_static on;" and the  
server starts preferring files with .js.gz extenstion and when a file  
.js is requested.

Please extend the Horde configuration to ask the site adminsitrators,  
if they want to have in /static pre-compressed .js and .css files, and  
if yes, if they want .gzip or .gz extension for those files. (or just  
create the .gz files in addition to the rest and that's all.

Please mention this bug in  
http://www.horde.org/apps/horde/docs/PERFORMANCE , or write some  
alternative text to enable serving of pre-compression files on the  
webserver.





More information about the bugs mailing list