Re: Want to avoid 304 error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you for your respose.
I've checked that browsers don´t work as you say they're supposed to work. When Apache aswers with a 304 response, the only cache-related header it includes by default into the response is 'Cache-Control: must-revalidate'. Internet Explorer 6.0 does nothing with it, after receiving this response, cache remains the same (entity expiry dates remains the same) so each time browser needs those elements, it sends a new http request an it receives a new 304 response. In the case of Firefox 2.0, the cache is updated, but not in the way I'd like: instead of this, entity's expiry date are updated to '1970-01-01 01:00:00', so the result is the same, each time the browser needs one of these elements, we have a request-304 response (with a worse performance)

Joshua Slive escribió:
On 7/20/07, Bello Martinez Sergio <serbel@xxxxxxxxxx> wrote:
Hi all,
I've configured Apache so that some elements (i.e. .js, .gif, .jpeg,
etc) are stored in browser's cache during a time. When I access to a
page contaning any of those elements, the browser doesn´t make a request
to the server, it get the content from cache instead. Until this moment,
all is ok.
The problem arises when the time I chose for element's caching finishes.
After this moment, each time the browser need one of those cached
elements, It makes a http request to the server and the response
includes a 304 error (I know it´s not an error, only a 'not modified'
message). The problem is that when a page contains many of these
elements (.js, .gif, etc), performance get worse (pairs request-reponse
304 take time), and there isn't a way to tell the browser to use cache's
information again, unless you modify files at server side.
So I want to know or if there is a way to configure Apache so that
browsers renew cache's elements expiry date when they receive a 304
error, or to configure Apache to not to answer with error 304, but to
reply with the corresponding file, even though this file's been not
modified.

Hmmm... By default, the 304 response should update any Expires or
Cache-Control response headers, and the client should update its cache
based on these new headers (or should recalculate expiry based on the
new response Date). If the client is not updating its cache after the
304 response, that sounds like a problem at the client.

To directly answer your question, I'm not sure if there is an easy way
to entirely turn off 304 responses. You could probably do
RequestHeader unset If-Modified-Since early
or you could activate mod_include processing for the files (but that
would be a waste of processor time).

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux