Forum OpenACS Q&A: Re: Proxy problems with log-in

Collapse
Posted by Tilmann Singer on
Your problem might go away when the server sends out pragma: no-cache, cache-control and/or expires header. Accessing your server with wget -S reveals that no such headers are being sent currently.

I added some code recently that sends out these headers, but it's in cvs HEAD only and not in the oacs-4-6 branch that you are propably using. Check out the proc ad_http_cache_control and where it is called in acs-tcl/tcl/request-processor-procs.tcl, if you want to copy it over to your installation. A more quick and dirty solution would be to add calls like this to your default-master:

ns_set [ad_conn outputheaders] "Pragma" "no-cache"
Collapse
Posted by russ m on
Personally I use
ns_set put [ns_conn outputheaders] "Cache-Control" "private"
ns_set put [ns_conn outputheaders] "Pragma" "no-cache"
Pragma: no-cache says the page is totally non-cacheable, but Cache-Control: private tells sufficiently smart browsers that they may cache the page while shared caches (like your office firewall/proxy) should not...
Collapse
Posted by Tilmann Singer on
I think the way it is now on head is ok, since you wouldn't want to have a typical openacs page cached, even by non-shared caches, since it normally contains a "logged in as" and maybe other information that should always be displayed up to date.

It is very annoying when a user clicks on 'Log out' and after that still sees 'Logged in as X' in the header, which I presume would happen when using Cache-Control: private.

The headers openacs sends out by default can be turned off with a kernel parameter by the way, so you can easily roll your own.