0

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?

Mark Henderson
  • 68,316
  • 31
  • 175
  • 255
  • Did you test with other browsers? Which ones? what were the results? –  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

2 Answers2

0

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.

  • 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. –  Sep 10 '09 at 16:05
0

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.