Welcome to WebmasterWorld Guest from 220.127.116.11
I have this simple mouseover swapimg code that I use for my sites. I just started using a new server and now all of the sudden this code doesnt work anymore. The mouse overs are extremly slow now. IE seems to be redownloading the image on every mouseover causing a 5 - 10 second delay in the swap.
I was confused by this so I copied the doc_root to my old server which is also running apache and loaded it with the same IE browser on the same PC and it worked perfect! The only variable was the server, everything else: the code and browser were kept constant.
I wanted to test this further so I loaded up firefox and went to the version that was *not* working and low and behold it worked without fail. I then went to the old *working* server and tested that and it worked *perfect* so now it looks like a browser issue....
I just dont understand why the combination of IE and That particular server yeilds terrible results.
Also, i read that it maybe a caching issue, but as far as i can tell neither server is issuing a no-cache header and the system times both servers and my PC are completly correct.
I used liveHeaders extension with firefox (which btw, firefox works fine with both servers even though i can tell on the one that doesnt work, its still revalidating the image, firefox is just so fast that it has no effect on the speed)...
Anyway, the one thing i noticed about the server that *doesnt* work is that it sends an etag: afa9f08sdff(some garbage) and it also sends: Cache-Control: max-age=0
These headers go with every file, including the jpegs that are used in the mouseover. I am absolutly positive this is the cause, however I tried to NO avail to get it to stop sending those headers and it will not.
I tried disabling the following apache modules, and the reason i selected these modules was because I ran a grep -R "Cache-Control" * and grep -R "max-age" * in the apache source/modules directory to figure out which modules had those strings in them:
I also disabled:
mod_frontpage.c for sh.its and grins.
I then restarted the server and it still outputting the same headers as before....
Also, when I did the grep, the binary libphp4.a file matched on both strings, however i have found no documentation on php's website about this behavior...
Have any Ideas?
Thanks in advance.
I also tried putting the code in an .html file so that it would be parsed by php and the headers were still sent, so now im pretty confident that the issue does not lie within the php processor, it *HAS* to be and issue with apache....
Anyone know how to fix this?!
I can't answer your question directly, but I'd suggest that instead of trying to turn things off (that you may need later), you simply set the headers properly [webmasterworld.com].
If php overrides these server cache-related settings, then use php to output appropriate cache-control headers.