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.

All images reloading on revisit

Discussion in 'General Discussion' started by cafrale, Nov 19, 2003.

  1. cafrale

    cafrale Member

    Joined:
    Aug 20, 2003
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Some clients are complaining that their sites are completely reloading the images when refresh is hit. As fas as I know the browser reloads the images only if you press CTRL-F5.

    They have tryied with windows, linyx, netscape, IE, opera ... No way. It appears the server doesn`t allow cache storing or something like this.

    Is there any configuration to be made on cpanel or server-side to solve this ?

    I have noticed it even on my site, on a flash animation i have on the top of it, it aways reload, even if I go to another page and click back to the first one (no F5 pressed, just revisiting the page).

    Can anyone throw some light on what happens ?
     
  2. bonnmac

    bonnmac Well-Known Member

    Joined:
    Apr 26, 2003
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    16
    mod_gzip

    If you have mod_gzip installed I have found this to cause this problem. You can tell your clients the following:

    Create a .htaccess file with the following line
    mod_gzip_on No

    and place it in their public_html folder, this should solve the problem. At least it did for me.
     
  3. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    For a global solution add the following to httpd.conf in the <IfModule mod_gzip.c> area

    mod_gzip_item_exclude file .jpg
     
  4. altomarketing

    altomarketing Member

    Joined:
    Nov 5, 2003
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    so why is importa ?

    I understand that the main function of mod_gzip is to compress info before sending, to optimize the speed of server , right ?

    so

    1- if I disable this function for jpg ands gif the images will cache and no longer download on revisiting ?
    2- if this mod is using to increase speed by compressing, why disable it the cache on iexplore, the mozilla or opera use cache normally

    3-How can i fix this problem without disable mod_gzip function in jpg or gif ?

    thanks
     
  5. aluminous

    aluminous Member

    Joined:
    Jan 10, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I don't know why mod_gzip makes images not cacheable, but in any case the rate of compression of already compressed images can't be very great; I wouldn't worry much about that.
     
  6. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    38
    Re: so why is importa ?

    There is no point gziping images, as for the most part they are already compressed. All it does is cause extra, unneeded load on your server. Add the following to your mod_gzip rules in your httpd.conf:


    Code:
    <Files ~ "\.(gif|jpe?g|png|bmp)$">
    mod_gzip_on no
    </Files>
     
  7. jmbtech

    jmbtech Registered

    Joined:
    Mar 15, 2004
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    file permission for theme folder

    Not sure if this will help anyone, but I've had the same issues with images reloading on every page visit to the index.html of the custom theme I've made. After poking around, I've check and when I recompiled apache, I exluded the mod_gzip module, so that wasn't it. Just outta trial & error, I ssh'd into the box to check file permissions on my uploaded theme againsted those shipped with cpanel.

    Turns out, mine where mixed permissions from an ftp user account and the cpanel ones were root. Therefore, I quickly chmod'd them to root:root recursivly on my theme folder, and poooof, my image problems disappeared.

    Just thought I would share my experience. Let me know if this solves anyone elses issues with image and cpanel themes.

    --
    jmbtech
     
  8. Stenny Chong

    Stenny Chong Well-Known Member

    Joined:
    Jun 12, 2002
    Messages:
    67
    Likes Received:
    0
    Trophy Points:
    6
    Add below line to your mod_gzip config section should fix the image not caching problem.

    mod_gzip_send_vary Yes
     
  9. thechronic

    thechronic Member

    Joined:
    Oct 25, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Amusive has proposed another good solution in this thread
     
Loading...

Share This Page