curl-library
Re: Pragma: no-cache
Date: Wed, 12 Nov 2008 09:38:43 +0000
Daniel Stenberg wrote:
> On Tue, 11 Nov 2008, Dan Fandrich wrote:
>
> >I've wondered why Pragma: no-cache is the default at all. IMHO, if the
> >application wants specific caching behaviour, it can ask for it itself.
> >Turning off caching can result in slower accesses, after all.
>
> It was once upon the time put there among the default headers because I
> cloned the behavior of a browser request. It has since simply been tagging
> along for old times' sake. Perhaps the time has come to reconsider this and
> just ditch that default request header...
As far as I know, browsers have only ever sent "Pragma: no-cache" when
user requests refresh (with the Refresh button) or sometimes only for
Control-Refresh.
For historical compatibility, it's sensible to send "Pragma: no-cache"
if sending "Cache-Control: no-cache" and the like, and in specialised
uses such as bug workarounds. Cache-Control is standard HTTP while
Pragma is from before HTTP standardised Cache-Control, but naturally
some old caches/servers only understand the former.
-- Jamie
Received on 2008-11-12