[TYPO3-dev] Core Behaviour: Using Cache-Control Headers to prevent _Clients_ from Caching
Martin Kutschker
martin.kutschker-n0spam at no5pam-blackbox.net
Mon Nov 20 22:26:39 CET 2006
Ekkehard Gümbel schrieb:
> Hi,
> I am struggling to prevent my friend the IE from caching locally...
>
> Normally, that is done using HTTP headers. TYPO3 supports these with the
> "sendCacheHeaders" config option.
> And it behaves just like TSRef says: "In case caching is not allowed,
> these headers are sent to avoid client caching: Cache-Control: private"
>
> Now "Cache-Control: private" is fine for regular proxy caches but not
> for client side caching (see
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
>
> Funny thing is, that in class.t3lib_userauth.php an undocumented (?)
> additional option called "sendNoCacheHeaders" seems to take care of this
> issue.
In userauth?!?
> Extending this concept to class.tslib_fe.php is solving my problem - see
> code below.
> (Another option would of course be to skip the "sendNoCacheHeaders"
> switch and make this behaviour always-on - but are of course cases where
> you want to prevent shared-caching but allow client-side caching. In
> fact this was Ole Tange's sole intention as he just told me.)
>
> Does this make any sense to someone?
Yes. I agree that both options are valid. I suggest to go the usual
TYPO3 way. Make config.sendNoCacheHeaders a pseudo boolean. So 1 means
what it means today: prevent shared caching (proxy) and 2 means what you
want: prevent private caching (client).
Masi
More information about the TYPO3-dev
mailing list