You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Chris <ch...@gmx.at> on 2015/04/12 21:47:53 UTC

browser back

Hi all,

How can browser back cache be disabled?

When having a page flow A > B > C > D, I would like that if page D is loaded, the session is invalidated and browser back cache disabled, so that browser back does not work anymore.
Between all other pages, browser back should work.

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


Re: browser back

Posted by Chris <ch...@gmx.at>.
Hi Martin,

thanks a lot for your answer!

Chris


> Am 14.04.2015 um 22:35 schrieb Martin Grigorov <mg...@apache.org>:
> 
> Hi,
> 
> You can use Session#clear() [1] to remove the history at the server side.
> It is not possible to clear the history in the user's browser though. See
> [2] for some discussions. If you clear at the server side anyway then the
> user will either see PageExpiredException or a new/fresh instance of C, B
> and A will be created.
> 
> 
> 1.
> https://github.com/apache/wicket/blob/5886f69e6a1f79ab6a1ff27f71b72da238b850b1/wicket-core/src/main/java/org/apache/wicket/Session.java#L286
> 2.
> http://stackoverflow.com/questions/20044554/how-to-clear-browsing-history-using-javascript
> 
> Martin Grigorov
> Freelancer, available for hire!
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> On Sun, Apr 12, 2015 at 10:47 PM, Chris <ch...@gmx.at> wrote:
> 
>> Hi all,
>> 
>> How can browser back cache be disabled?
>> 
>> When having a page flow A > B > C > D, I would like that if page D is
>> loaded, the session is invalidated and browser back cache disabled, so that
>> browser back does not work anymore.
>> Between all other pages, browser back should work.
>> 
>> Thanks a lot,
>> Chris
>> ---------------------------------------------------------------------
>> 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


Re: browser back

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

You can use Session#clear() [1] to remove the history at the server side.
It is not possible to clear the history in the user's browser though. See
[2] for some discussions. If you clear at the server side anyway then the
user will either see PageExpiredException or a new/fresh instance of C, B
and A will be created.


1.
https://github.com/apache/wicket/blob/5886f69e6a1f79ab6a1ff27f71b72da238b850b1/wicket-core/src/main/java/org/apache/wicket/Session.java#L286
2.
http://stackoverflow.com/questions/20044554/how-to-clear-browsing-history-using-javascript

Martin Grigorov
Freelancer, available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Sun, Apr 12, 2015 at 10:47 PM, Chris <ch...@gmx.at> wrote:

> Hi all,
>
> How can browser back cache be disabled?
>
> When having a page flow A > B > C > D, I would like that if page D is
> loaded, the session is invalidated and browser back cache disabled, so that
> browser back does not work anymore.
> Between all other pages, browser back should work.
>
> Thanks a lot,
> Chris
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>