mod_asis in combination with mod_deflate

  • joebert
  • Weathered
  • Genius
  • User avatar
  • Joined: Feb 10, 2004
  • Posts: 11874
  • Loc: Clearwater, FL
  • Status: Offline

Post November 5th, 2009, 10:55 pm

gzip compressed files, good.
CPU usage added by compressing files with mod_deflate, bad.

What if I compress copies of static files with gzip before hand and send those with some fancy mod_rewrite rules that check the Acept-Encoding HTTP header for gzip though ?

One way I can think to do this is to generate the files with something like wget in combination with a --header= switch to force the server to send me something I can use with mod_asis to send those files with the headers already attached. I'm not sure if that will complicate things like mod_expires though.

Another thought is just to save *.gz files and hope Apache and mod_rewrite will send the correct headers along with that compressed file. I have a feeling that's not going to work out though.

I could rewrite all requests to a PHP/CGI script that generates the headers and does a simple passthru() with the files content, but I have a feeling that's going to defeat the purpose of avoiding the much simpler mod_deflate.

Anyone ever do anything like this before, any ideas ?
Why yes, yes I am.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post November 5th, 2009, 10:55 pm

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 35 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© Unmelted Enterprises 1998-2009. Driven by phpBB © 2001-2009 phpBB Group.