Click here to Skip to main content
11,630,646 members (74,833 online)
Click here to Skip to main content

Tagged as

Regarding back button after signout

, 20 Nov 2011 CPOL 11.1K 4
Rate this:
Please Sign up or sign in to vote.
Regarding back button after signout
In your webpage after signout and pressed back button, the previous session will remain the same. So use the below JavaScript. So that previous session will open.

For example: In our CodeProject.com after signout press back button .. your previous session will remain the same.

<script type="text/javascript">
        function noBack()
         {
             window.history.forward()
         }
        noBack();
        window.onload = noBack;
        window.onpageshow = function(evt) { if (evt.persisted) noBack() }
        window.onunload = function() { void (0) }
    </script>

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

vinoth kumar rajendran
Software Developer (Junior) Hp finsoft
India India
No Biography provided

You may also be interested in...

Comments and Discussions

 
GeneralReason for my vote of 3 It is good. I am searching it from a... Pin
Danish Shamshad23-Nov-11 1:24
memberDanish Shamshad23-Nov-11 1:24 
GeneralReason for my vote of 1 u always can choose to go to step ba... Pin
itaitai22-Nov-11 22:39
memberitaitai22-Nov-11 22:39 
GeneralRe: not for every page that i have given these code..when we are... Pin
vinoth kumar rajendran24-Nov-11 15:25
membervinoth kumar rajendran24-Nov-11 15:25 
GeneralIs this function to call on sign out link/button Pin
mayur csharp G21-Nov-11 1:30
membermayur csharp G21-Nov-11 1:30 
GeneralRe: no need of calling in signout button just we want to write t... Pin
vinoth kumar rajendran24-Nov-11 15:23
membervinoth kumar rajendran24-Nov-11 15:23 
GeneralReason for my vote of 2 nice Pin
maheshsanika16-Nov-11 1:00
membermaheshsanika16-Nov-11 1:00 
GeneralReason for my vote of 4 Good one :) Pin
jawed.ace9-Nov-11 20:09
memberjawed.ace9-Nov-11 20:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150723.1 | Last Updated 20 Nov 2011
Article Copyright 2011 by vinoth kumar rajendran
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid