sridaran Posted April 7, 2011 Share Posted April 7, 2011 Can any one tell me how to delete Session on Clicking Browser Back Button? Is it possible in javascript? Please tell. Link to comment Share on other sites More sharing options...
thescientist Posted April 7, 2011 Share Posted April 7, 2011 what session? Link to comment Share on other sites More sharing options...
jeffman Posted April 7, 2011 Share Posted April 7, 2011 You'll need to capture the window.onunload event, I think, and send an AJAX message to your server. You may need to do it synchronously for the correct headers to reach your server. I don't recall. Link to comment Share on other sites More sharing options...
sridaran Posted April 8, 2011 Author Share Posted April 8, 2011 what session?K.When we Login into a site we store the id's in the session.When user entered into the site and if he clicks on the Browser Back Button to go to Previous page the Session which contains the Login details has to be Deleted and it has to redirect to Login Page.If he want to go to site again he has to Login with required Credientials..Username,Password. Link to comment Share on other sites More sharing options...
sridaran Posted April 8, 2011 Author Share Posted April 8, 2011 You'll need to capture the window.onunload event, I think, and send an AJAX message to your server. You may need to do it synchronously for the correct headers to reach your server. I don't recall.Hi,Can you give an Example code. Link to comment Share on other sites More sharing options...
jeffman Posted April 8, 2011 Share Posted April 8, 2011 You would learn more if you searched for "onunload" and tried writing some code to match your situation. If it doesn't work, post your code. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.