Forum Moderators: phranque

Message Too Old, No Replies

Missing Response Headers

         

tomp_gl

2:36 am on Mar 10, 2009 (gmt 0)

10+ Year Member



Hi,

I have noticed that my Apache 2.2 installation is quite frequently serving content without response headers, causing the browser to re-download cacheable content such as images. This is creating extra threads and putting strain on the bandwidth as the same images are being downloaded again and again unnecessarily. Can anyone explain why this is occuring? It seems to occur every second refresh.

<snip>

Thanks in advance for any help!

[edited by: jdMorgan at 1:14 pm (utc) on Mar. 10, 2009]
[edit reason] No URLs, please. See TOS. [/edit]

jdMorgan

1:33 pm on Mar 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's not possible to comment, since we know nothing about how your "Web site" works.

If you are using a script to serve all or most content, look to an error in passing requests to that script, and in how the script generates response headers.

If no scripts are involved in serving content on your server, than you've likely got a bad Apache installation.

One thing that can greatly simplify testing and aid in getting valid test results is to always start each "test cycle" by completely flushing your browser cache. Then examine the server HTTP response headers for each initial request and the subsequent requests (browser "refresh" requests) using the "Live HTTP Headers" add-on for Firefox/Mozilla or similar.

Jim

tomp_gl

9:38 pm on Mar 10, 2009 (gmt 0)

10+ Year Member



Thanks.

The link I supplied to an image on the server demonstrating the problem was removed by a moderator. The server only serves images - no HTML or dynamically generated files. It seems the response headers are being sent on every request, but for some reason the browser is not seeing the e-tag response header? I've tried both Apache 1.3 and 2.2.

jdMorgan

11:50 pm on Mar 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In addition to the eTag, you should configure your server to send the proper HTTP Expires and Cache-Control headers. See Apache mod_expires and mod_headers.

Jim

tomp_gl

11:56 pm on Mar 10, 2009 (gmt 0)

10+ Year Member



I've installed mod_expires now, at it works well. I'm just still not sure why the etag wasn't being obeyed.

Thanks