While this issue is specific to lighttp but I was hoping someone here has got it working with this module.
Whenever the browser requests a js file (Accept-Encoding: gzip,deflate) the Response Header is always application/javascript and it does not send the gzipped version of the js file.
Here are the headers:
Response Headers
Expires Sun, 18 Oct 2009 15:23:07 GMT
Cache-Control max-age=604800
Content-Type application/javascript
Accept-Ranges bytes
Etag "-1714912946"
Last-Modified Sun, 11 Oct 2009 15:14:55 GMT
Date Sun, 11 Oct 2009 15:23:07 GMT
Server lighttpd/1.4.19
Request Headers
Host example.com
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 GTB6 (.NET CLR 3.5.30729)
Accept */*
Accept-Language en-gb,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
Connection keep-alive
Referer http://example.com/page1
Cookie textsize=100; SESS0e7bf5dd352f06928d127c283a5a858c=dpu2d24sgd0lj8jejoj11mq0j2; SESS13a38ce26369ebf1577e7d9e453655c3=d5dfkurss427gd05auqlndv7v7; has_js=1
If-Modified-Since Sun, 11 Oct 2009 15:14:55 GMT
If-None-Match "-1714912946"
Cache-Control max-age=0
Does anyone know what I need to modify in order to get lighttp to send the gzip js file?
Comments
Comment #1
andrewsuth commentedOk, I've worked this one out through some study..
In the end, I disabled GZip compression on the module and let Lighttpd do all of the work by adding
application/javascript(which allows JS files to be compressed by Lighttpd) inlighttpd.conf:compress.filetype = ("text/plain", "text/html", "application/javascript", "application/x-javascript", "text/css")