Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We've been running lighttpd on our image servers for quite some time, but in an effort to speed up page load times, we've been working toward using mod_compress and etags to speed things up.

I've added the following lines to the config:

server.modules = ( "mod_compress" )
etag.use-mtime = "enable"                                                                                                                                                                                                                                                           
etag.use-inode = "disable"                                                                                                                                                                                                                                                          
static-file.etags = "enable"                                                                                                                                                                                                                                                        
compress.cache-dir = "/tmp/lighttpd/cache/compress/"                                                                                                                                                                                                                                
compress.filetype = ("text/plain", "text/html", "text/css", "text/javascript")

And suddenly no images, css, or javascript are appearing in internet explorer (6 or 7) - google has nothing to say about it. Anyone have any ideas?

share|improve this question

migrated from Sep 10 '09 at 19:50

This question came from our site for professional and enthusiast programmers.

Did you test with other browsers? Which ones? what were the results? – Jay Sep 10 '09 at 15:24
Maybe it is not placing the headers correctly, or because its gzip. I use deflate with my apache and it works like a charm. I don't use lighttpd so... all I can say is that in apache it is mod_deflate. – Havenard Sep 10 '09 at 15:32
Not really on-topic but if you look at the performance gains of gzipping JPG's you'll find it actually slows the process down. GZipping a JPG gives you zero size benefit, and the additional overhead of compression/decompression. A jpg is already very heavilly compressed. – Mark Henderson Sep 10 '09 at 20:45
Actually, never mind, I see from your code that you're only compressing static text content. My apologies. – Mark Henderson Sep 10 '09 at 20:46

Are they actually sending an Accept-Encoding: gzip, deflate or similar header with the request? Otherwise they might ignore the Content-Encoding header sent with the resonse. I've heard you have to make sure they use HTTP/1.1 for some older browsers to support it.

I've seen multiple configurations that explicitely do not zip content for IE6 because it cannot handle it. I thought (hoped?) that would have been fixed for version 7, but maybe that is not the case.

share|improve this answer
IE6 handle it. At last deflate. – Havenard Sep 10 '09 at 15:50
It is properly showing the Accept-Encoding: gzip, deflate header. I think it may have something to do with an older version of lighttpd. – pivotal Sep 10 '09 at 16:05
up vote 0 down vote accepted

This was a lighttpd version issue. The version of lighttpd that we were running on the bad server was an old one with bad compression support. Upgrading to the latest and greatest resolved the issue.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.