[....]
> So, is this a feature waiting to be developed? Or is there a way to
> make it work right with the existing code?
Django does a reasonable, but not sterling, job in this particular case.
We need to add a few more "no really, we seriously mean it" headers for
the don't cache situation. The GMail instance is closer to the real
thing for never caching.
Right now Django is serving up "never_cache" as "always stale", however
browsers and intermediate caches are permitted to serve stale instance
under certain circumstances (and, when you throw in buggy
implementations, even more often than that). You're seeing the
variations of interpretation between your IE and Firefox experiments,
for example. It's a difficult area and not particularly well (and
definitely not consistently) implemented across browsers. I suspect it
might be provable that, in this case, both browsers are doing a correct
thing, if you look hard enough at the specs (particularly when you throw
in offline browsing considerations).
In conclusiong, though, we can and will, at some point, throw in a few
more headers in this particular case.
Regards,
Malcolm
Note that "no-store" or "no-cache" in combination with HTTPS is known
to be buggy in some IE browsers, primarily for file downloads. If a
non-buggy HTTPS is desired, you should be able to get nearly the same
non-caching result with "max-age=0, private, must-revalidate".
'max-age=0' means cached entries are always stale.
'private' means it will never get stored in conforming shared caches
-- essentially equivalent to 'no-store' for shared caches. HTTPS-only
gives the same result.
'must-revalidate' in this case means that conforming browsers must
always revalidate stale entries which theoretically should mean a new
fresh request with each display (a conditional request if Last-
Modified or Etag is also set), although I haven't tested this behavior
with Firefox history browsing using the back button.
Note, if you're using the Firebug extension, you might want to turn it
off when testing browser cache revalidate behavior as it messes with
some of this.
Ric