Project

General

Profile

Actions

Feature #16731

closed

Cache-Control Headers do not address client-side caching

Added by Ekkehard G¼mbel over 17 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2006-11-21
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

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 shared proxy caches but not for client side caching (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).

What it takes is to send additional headers, at least "Expires:"
(There are other options that could be used, while this one is preferred.)

To address all purposes (enable or disable client caching), IMHO the behaviour should be toggable.
Funny thing is, that in class.t3lib_userauth.php an internal variable called "sendNoCacheHeaders" seems to take care of this issue.

Extending this concept to a TS switch for class.tslib_fe.php is solving the problem - patch is attached.

Bottom line is:
sendNoCacheHeaders = 0 : prevent shared (a.k.a. proxy) caching, allow client (a.k.a. browser) caching. This was Ole Tange's sole intention when introducing sendCacheHeaders, as he just told me.

sendNoCacheHeaders = 1 : prevent all caching

[Another option would be to change "sendCacheHeaders" (without the "No") from boolean to multiple value or even bitmask, but I'd tend to avoid this.]
(issue imported from #M4541)


Files

class.tslib_fe.php.patch (998 Bytes) class.tslib_fe.php.patch Administrator Admin, 2006-11-21 13:08
Actions #1

Updated by Martin Kutschker over 17 years ago

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: prevent private caching (client)

Actions #2

Updated by Ekkehard G¼mbel over 17 years ago

Are you talking of config.sendCacheHeaders (without the "No")?

Actions #3

Updated by Peter Niederlag over 17 years ago

Some additional info can be found in this thread from dev-list:
http://lists.netfielders.de/pipermail/typo3-dev/2006-November/020767.html

Actions #4

Updated by Vladimir Podkovanov over 14 years ago

Hi, any news on this issue?

I'm running into that Opera 9.0 caches pages and does not check them again unless no-cache header was manually sent at first place (has no such issue with FF and IE).
I get it fixed with config.additionalHeaders = Expires: 0|Cache-Control: no-cache, must-revalidate|Pragma: no-cache

But would be more handy to send all those headers automatically (really as Ekkehard Gümbel wrote there are "no cache" headers in class t3lib_userAuth, just config option should be added to triger them).

Actions #5

Updated by Alexander Opitz about 11 years ago

  • Category deleted (Communication)
  • Status changed from New to Needs Feedback
  • Target version deleted (0)
  • PHP Version deleted (4)

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #6

Updated by Alexander Opitz over 10 years ago

  • Status changed from Needs Feedback to Closed

No feedback for over 90 days.

Actions

Also available in: Atom PDF