[TYPO3] frontend users - user logged out, pages still in browser cache?

JoH asenau info at cybercraft.de
Mon Aug 6 18:05:21 CEST 2007


>>> However, after pressing "back" button in the browser, anyone can
>>> see the content of this Very-Important-Page, which is of course
>>> undesired.
>>>
>>> Is there a workaround for that?
>>
>> I think you can send proper cache headers if user is logged in. Check
>> TSRef/config for cache headers and TSRef/conditions to find how to
>> detect if user is logged in.
>
> Hmm, I'm not sure.
>
> I tried disabling _all_ caching, by putting page.config.no_cache=1 to
> the main template/setup, and it didn't help. Perhaps the proxy
> wouldn't cache it, and the browser would delete it from cache after
> the browser closed - but it doesn't help for a mere "back" button.
> Unless I do it wrong.

Well - there's a slight difference between "disabling the TYPO3 cache" and
"disabling the browser cache":

> So I guess it must be something else?
>
>   <meta http-equiv="Pragma" content="no-cache"/>
>   <meta http-equiv="Cache-Control" content="no-cache"/>
>
> Perhaps that's what I should try to put on a TYPO3-generated page?

Exactly this _is_ the difference.
no_cache = 1 is
a) the worst thing you could ever do to your TYPO3 pages since it will
disable the caching completely and thus decrease the overall performance
dramatically.
b) completely useless regarding the browser cache problem

what you are looking for can be found here:
http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/7/3/

look for
sendCacheHeaders
sendCacheHeaders_onlyWhenLoginDeniedInBranch
The last one pretty much sounds like the solution to your problem.

HTH

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
openBC/Xing: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com




More information about the TYPO3-english mailing list