Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on How to disable the back button after logout within the JSP forums, part of the Web Development category; Hi, I wrote the code for logout in jsp.. But I dont know how to disable the back button.. Or give any other solution for this.. I had seen many ...
|
|||||||
|
|||
|
How to disable the back button after logout
Hi,
I wrote the code for logout in jsp.. But I dont know how to disable the back button.. Or give any other solution for this.. I had seen many forums. But still I didn't get the solution. Please help me... |
| Sponsored Links |
|
|||
|
Re: How to disable the back button after logout
Hi Jyothi,
No need to disable the back button... What u should do is just to redirect the same page when u click back button... for Ex... Consider you are having Logout.jsp, use the following script within your <head> Tag... <script type="text/javascript"> window.onunload = unloadPage; function unloadPage() { document.FrmLog.action="SN_LogoutDisp.jsp"; document.FrmLog.submit(); } </script> I tried this... It worked... |
|
|||
|
Re: How to disable the back button after logout
Hi,
Try this code... <% response.setHeader("Pragma","no-cache"); response.setHeader("Cache-Control","no-store"); response.setHeader("Expires","0"); response.setDateHeader("Expires",-1); %> OR <script language="JavaScript" type="text/javascript"> window.history.forward(1); </script> Regards, Rijus. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to write the coding for logout in jsp? | pmsudha | JSP | 1 | 12-26-2008 09:43 AM |
| Disabling back button | manatworkk007 | ASP.NET | 1 | 07-01-2008 02:30 AM |
| Why logout does not work in ASP.NET | ahsanm | ASP.NET | 2 | 03-15-2008 05:18 PM |
| AJAX and the Back Button Problem | Lokesh M | AJAX & XML | 0 | 02-10-2008 04:57 AM |
| Javascript for disabling back button | Mahesh Shelar | JavaScript | 0 | 02-07-2008 05:59 AM |