I am working on site where potentially two different users could login to the same browser without it having been closed.
This can allow the second user to use the back button and see cached pages belonging to the first user. I can't find a way of preventing the second user from seeing the previous users cached history.
I know it is possible, what is the best way to achieve this?
i hope this article helps you
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=appF ramework_18.html
If you are also using session variables you may want to read this about Ending a session
Of course that assumes the user actually performs some logout step. Without the browser being closed all requests will use the same session as far as ColdFusion is concerned. Be careful!
All,
Little_Mike is incorrect. Those headers have proved inefficient on many occasions, depending on the browser the user is using. The two fixes that I have found to be foolproof to never worry about caching, are these:
1. You use a <cfset Sleep(5000)> at the top of the page. This will cause the browser and the server to have enough time to catch up to the latest version of the page, and not revert back to a cached version.
2. Use a cflocation to the current page. This will essentially reload the page, and all new information will be available on the page.
All,
Little_Mike is definitely disseminating incorrect ColdFusion information.
Mike blindly throws out a bunch of cfheader tags with reckless abandon, seemingly unconcerned about the cross-browser effects.
Clearly, the appropriate solution in these circumstances is to use the cross-browser compatible tag <cfcontent> as follows:
<cfcontent reload="true" content="refresh" page="reload">
I am interested to know where you have used that code jerseycat10? None of those attributes that you have listed can be used with the cfcontent tag. I have used the same cfheader tags that Little_Mike listed for years. They work.
Here is the CF9 documentation for the cfcontent tag: http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461 172e0811cbec22c24-7c82.html
North America
Europe, Middle East and Africa
Asia Pacific