Welcome to WebmasterWorld Guest from 54.158.228.55

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Problem with caching headers being sent!

     
6:36 pm on Apr 27, 2004 (gmt 0)

10+ Year Member



Problem:

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.

PLEASE HELP!

----------
Update:
----------

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:

mod_proxy_cache.c
mod_expires.c
mod_usertrack.c
mod_headers.c

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.

--------
Update
--------

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?!

6:36 pm on Apr 27, 2004 (gmt 0)

10+ Year Member



In that last part, i meant that i put it in an HTML file so that it *WOULDNT* not would be parsed by PHP
6:57 pm on Apr 27, 2004 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



digitsix,

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.

Jim

9:55 pm on Apr 27, 2004 (gmt 0)

10+ Year Member



Well i appreicate the help, however, i would prefer to disable the webserver from sending these headers since they are not necessary and to date have done nothing but screw things up =)

Anyone else know?

 

Featured Threads

Hot Threads This Week

Hot Threads This Month