PDA

View Full Version : [PATCH] Prevent status frame from reloading all images



mcfly
2005-05-24, 02:43
> But isn't "no-cache" set by the server to prevent the browser from
caching
> files? If I understood that bug report the problem is that slimserver
> always adds the no-cache header, even for images. I'm going to download
> liveHTTPheaders right now...

Cache-control is a general header. Both clients and server can use it.

I just did some experiments with a simple html-page containing the
refresh meta-tag (<meta http-equiv="refresh" content="10">).

When loading the page for the first time, the browser (Firefox 1.04) does:

GET /reload.html HTTP/1.1
If-Modified-Since: Tue, 24 May 2005 09:31:15 GMT

and the server answers with

HTTP/1.x 304 Not Modified

Clicking on reload behaves the same.

When forcing reload (Shift-Click on reload button), the browser doesn't
set the "If-Modified-Since"- and "no-cache" headers:

GET /reload.html HTTP/1.1
Pragma: no-cache
Cache-Control: no-cache

and the server returns the complete document:

HTTP/1.x 200 OK


When page refresh is triggered by the meta-tag, the request/response
looks the same (no if-modified-since, no-cache, server returns complete
document).

So the relevant request header is "If-Modified-Since". If it is missing,
the server sends the complete document (HTTP 200). "no-cache" however,
should only influence the behaviour of caching proxies between the
client and the slimserver.