You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by wil2008 <wc...@gmail.com> on 2010/03/04 08:56:26 UTC

Re: Clearing Cache after Logout

Yes that was browser behaviour. But the http protocol has some degree of
control on this at least.
And Wicket is flexible enough to take advantage of that!
I added this to my main page. After logout, clicking the back button makes
the browser (ff 3.5) show the login page but not the main page :)

 response.setHeader("Cache-Control", "no-cache, max-age=0,
must-revalidate"); // no-store
        response.setHeader("Cache-Control", "no-store");
        response.setDateHeader("Expires", 0);
        response.setHeader("Pragma", "no-cache");



pointbreak+wicketstuff wrote:
> 
> That you get back to your last page when hitting the back button has
> nothing to do with Wicket. It's just what browsers do when you hit the
> back button. I guess you are using firefox (3), and firefox 3 will show
> a page from its in-memory cache, even if the page headers tell it the
> page is expired long ago, must be reloaded, and must be revalidated
> (which is what wicket tells it by default). Google on "firefox cache
> reload" or something for how firefox caches pages and for suggestions on
> how to force a page reload.
> 
> On Thu, 04 Dec 2008 18:35:09 +0200, "Serkan Camurcuoglu"
> <Se...@telenity.com> said:
>> you can set your application's home page as your expired page or throw a 
>> restartresponseexception (to home page) from the constructor of your 
>> page expired page.. at least I do it that way..
>> 
>> 
>> vishy_sb wrote:
>> > Thanks for the reply there Nino. I have set up a custom expired page
>> and have
>> > set the following in Application class 
>> > getApplicationSettings().setPageExpiredErrorPage(PageExpired.class);
>> >
>> > Now the page expired is set to this page. But still on hitting the back
>> > button I get back to the page. I tried  using the
>> > SimplePageAuthorizationStrategy in my Application.init() method. The
>> code
>> > that put in there looks something like this
>> >
>> > SimplePageAuthorizationStrategy authorizationStrategy = new
>> > SimplePageAuthorizationStrategy(
>> >                 LimitManagerPage.class, PageExpired.class)
>> > 		{
>> > 			protected boolean isAuthorized() {
>> > 				// Authorize access based on user authentication in the session
>> > 				if(((WebSession) Session.get()).isSessionInvalidated()){
>> > 					return false;
>> > 				} else {
>> > 					return true;
>> > 				}
>> > 			}
>> > 		};
>> >  
>> >  
>> getSecuritySettings().setAuthorizationStrategy(authorizationStrategy);
>> >
>> > But this doesn't provide the desired result as well. This doesn't even
>> show
>> > my custom PageExpired web page. Any ideas about why this is not working
>> or
>> > something else that I can do to get this to work.
>> >
>> > Thanks in advance,
>> > vishy
>> >
>> >
>> >   
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Clearing-Cache-after-Logout-tp20823965p27777771.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org