[Tickets #11017] Re: precompress files in /static

bugs at horde.org bugs at horde.org
Tue Feb 21 21:58:31 UTC 2012


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

Ticket URL: http://bugs.horde.org/ticket/11017
------------------------------------------------------------------------------
  Ticket             | 11017
  Updated By         | Michael Slusarz <slusarz at horde.org>
  Summary            | precompress files in /static
  Queue              | Horde Base
  Version            | 4.0.13
  Type               | Enhancement
-State              | Feedback
+State              | Rejected
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


Michael Slusarz <slusarz at horde.org> (2012-02-21 14:58) wrote:

> With pre-compression I mean to extend Horde to create for each  
> static/f.js a corresponding static/f.js.gz and for each static/k.css  
> a corresponding static/k.css.gz file at the same time the original  
> file (without .gz) is created.

Why?  What good is a *.gz file unless the *web server* delivers it as  
such.  You can't just place a .gz file in a directory and expect a  
webserver to use that when the base file is accessed.  This demands  
additional configuration on the webserver, so putting an option in  
horde's conf.php that doesn't do anything by default on is not  
desirable.  Especially when there are other options available on the  
webserver side that does this all transparently.  Why configure 2  
locations when you only have to configure 1?

> When a browser requests static/m.js and does Accept-Encoding: gzip,  
> the webserver checks if static/m.js.gz exists, and sends  
> static/m.js.gz to the browser,(instead static/m.js)  stating the  
> response is gzip-encoded.

And you just proved my point.  As you write "When a browser requests  
[the file] ... the WEBSERVER checks...."  This is by no means the  
default action for webservers and requires additional configuration.

> I know the payload for any html page is not known until the page is  
> created, however this is not true exactly true for javascript/css  
> files, which are created once but delivered several times.

This is an incorrect statement.  The CSS for any given page is not  
known until someone accesses that page for the first time, just like  
the javascript files.

> I think this functionality belongs to Horde and it is not up to each  
> single administrator to find ways to compress the .js/.css files  
> from static/ .

Disagree.

I recommend you look at lighttpd and the mod_compress module,  
specifically compress-cachedir, which does all this compression  
transparently.





More information about the bugs mailing list