The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

if you use mod_gzip: images won't cache in IE

Discussion in 'General Discussion' started by amusive, Apr 2, 2004.

  1. amusive

    amusive Member

    Joined:
    Jul 7, 2003
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    I noticed with the default configuration options on CPanel's mod_gzip, it does not explicitly exclude images from being gziped. Images (afaik) will never be compressed, but they should be excluded.

    The main reason for excluding them: IE refuses to cache more or less anything that's been passed through mod_gzip. I noticed on all the sites hosted on my server no images would cache. This appears to be a bug due to one of the headers that mod_gzip sends out on files it serves.

    Do a search for

    <IfModule mod_gzip.c>

    and add in this section:

    mod_gzip_item_exclude file "\.jpg$"
    mod_gzip_item_exclude file "\.jpeg$"
    mod_gzip_item_exclude file "\.png$"
    mod_gzip_item_exclude file "\.gif$"
    mod_gzip_item_exclude mime ^image/.*

    This worked for me; images are now being cached by IE browsers. (You should be able to get away, I think, with just the mime exclude line, but I put them all in).
     
  2. tipsterbaine

    tipsterbaine Member

    Joined:
    Dec 17, 2003
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Oh blo**dy hell. Thanks for that.
     
  3. thechronic

    thechronic Member

    Joined:
    Oct 25, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    The basic cpanel config of mod_gzip also does not state the mod_gzip_maximum_file_size, I have now set this to 500000 according to the recommendation in the mod_gzip documentation.

    I have also made a new directory /home/mod_gzip_tmp and assigned it to mod_gzip_temp_dir since I was getting some large .wrk files in the standard /tmp dir which were not removed. The standard /tmp dir was not large enough to contain these.

    I'm getting "mod_gzip: EMPTY FILE [/tmp/_17393_99_0.wrk] in sendfile2" errors from time to time which is probably caused by the mod_ssl module according to some forum posts. I'm not using SSL on any of the sites on my server so I was thinking about disabling mod_ssl but I guess it's needed for WHM / cpanel access...
     
Loading...

Share This Page