Re: HTTP Response Code 304

From: Bert Driehuis <bert_driehuis@dont-contact.us>
Date: Sun, 11 Jun 2000 19:33:50 +0200 (CEST)

On Sat, 10 Jun 2000, Adi Linden wrote:

> I have a webserver which returns all pages with response code 304. All
> pages send from the server come up with TCP_MISS/304 and are not cached.
> The content still makes it to the browser, though.

No, it does not make it to the browser. If you see TCP_MISS/304, it means
your browser asked the origin Web server if the page the browser (or
other downstream cache) holds in its cache is still current. The 304 tells
the browser it does not have to refetch the page. The TCP_MISS tells you
your Squid cache had to verify the content at the origin server (i.e., it
wasn't considered "fresh enough" not to recheck, see refresh_pattern in
squid.sonf).

All that gets transferred in a 304 is the header data, the actual page is
not transferred. Not between the origin server and your Squid, and not
between your Squid and the browser (or downstream cache).

Note that clearing your Web browser cache doesn't always remove
everything. To be sure, go to a web page on a different server, then clear
your browsers cache, and shutdown your browser. Then refetch your page.

By the way, getting a lot of TCP_MISS/304 is the optimum situation if you
always want to make sure your users see exactly what's on the server. By
using refresh_pattern, you can optimize pages you are sure don't change
often. However, that introduces the risk that users see stale content, for
example, from badly written ad serving scripts.

Cheers,

                                -- Bert

Bert Driehuis, MIS -- bert_driehuis@nl.compuware.com -- +31-20-3116119
Dihydrogen Monoxide kills! Join the campaign at http://www.dhmo.org/
Received on Sun Jun 11 2000 - 11:38:01 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:53:59 MST