How to invalidate session when browser navigation buttons are clicked?

How to invalidate session when browser navigation buttons are clicked?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sathish David Kumar NArchitectCommented:
>>>>>>>>>How to invalidate session when browser navigation buttons are clicked?

Why your setting session invalidate  is there any reason ?
akashsureshAuthor Commented:
My project is a simulation of Tamil Nadu Civil courts.I want people to navigate using only the tabs provided for security.
Sathish David Kumar NArchitectCommented:
ok you can get the back button key value and forword key value in java script while your key pressed submit the form go to java and there invalidate the session and forward to ur session expiry jsp
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Sathish David Kumar NArchitectCommented:
if you need some code sample??
akashsureshAuthor Commented:
Yes can you give me an example
Sathish David Kumar NArchitectCommented:
<input onkeyup="return onkeyup()" />

function onkeyup(e) {
    var code;
    if (!e) var e = window.event;
    if (e.keyCode) code = e.keyCode;
    else if (e.which) code = e.which;  

    if (keycode == 8 )   // 8 is for key borad back button not browser
       // submit your form here and go to java and invalidate your session
Sathish David Kumar NArchitectCommented:
akashsureshAuthor Commented:
Ok what if I want to disable back forward and refresh
akashsureshAuthor Commented:
I mean session invalidate for back forward and refresh
Sathish David Kumar NArchitectCommented:
take the refrences only u can get the key pressed and mouse down....

and do as per the command http://#35225794
Mick BarryJava DeveloperCommented:
Implementing that kind of security feature in Javascript leaves a pretty big hole in the system.  All someone has to do is disable Javascript in their browser and your site is wide open.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.