ushajava said:
Hi,
I have one question that, how to code when I hit the "Back" Button of
the browser it shoud state that Session is Expired. Please help in
this regard.
That is client-side behavior. If the page is cached you will not be able to
do it.
I will assume you are dealing with a servlet / JSP application, something you
failed to reveal.
Give the page a no-cache parameter. When it re-POSTs use the Token pattern
to detect the revisit of the page and reject the session, which presumably
you will have already invalidated, right?
In general you can do nothing about client-side events, and should do nothing
about standardized behaviors like BACK or REFRESH (alt-left or F5,
respectively, on just about every browser). What you can do is react to
events that hit the server, and generate appropriate responses.