homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

Problem with caching headers being sent!

10+ Year Member

Msg#: 1456 posted 6:36 pm on Apr 27, 2004 (gmt 0)


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



10+ Year Member

Msg#: 1456 posted 6:36 pm on Apr 27, 2004 (gmt 0)

In that last part, i meant that i put it in an HTML file so that it *WOULDNT* not would be parsed by PHP


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

Msg#: 1456 posted 6:57 pm on Apr 27, 2004 (gmt 0)


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.



10+ Year Member

Msg#: 1456 posted 9:55 pm on Apr 27, 2004 (gmt 0)

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?

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved