About user exit, click the browser back to return to the original page solution 2, still back to the original
Solution 1: Disable caching. The previous method was used on the computer, but there were still problems with ipad and Android mobile phones.
Solution 2: Disable the browser's back key javascript: window. history. forward (1); the result is the same as solution 1, and the pad has no effect.
Solution 3: Response. write ("<script> window. location. replace ('login. aspx ') </script> "); it can still be used to back up. It seems that it is not as good as 1 or 2. However, you can add an onclick event on the front end, which does not involve form submission, as a result, solution 4
Solution 4: Use ajax to clear the session on the ajax page, and add js on the current page
function logout(isLogout) { if (isLogout != "") { $.ajax({ url: "ajax/logout.aspx", data: "code=" + encodeURI(isLogout), cache: false, datatype: "html", success: function (context) { LogoutReturn(context); } }); } else { return "Error"; } } function LogoutReturn(context) { if (context == "success") { location.replace('login.aspx'); } }