javascript - How to destroy session on clicking back button of browser using jquery -
After logging in, if I click on the back button of the browser, then I direct it to a php page using jquery I want to delete the session.
Here is my Juke Code which is working fine for Mozilla. But Chrome is not working on. I want the browser to be free.
Thanks in advance
& lt; Script & gt; $ (Document) .ready (function () {ifof history.pushState === "function") {history.pushState ("bbs", null, null); Window.onpopstate = function () {history.pushState () 'Newbbs', blank, zero);} $ (Place) .attr ('href', 'backbuttonsessiondeactivation.php');}}); & Lt; / Script & gt;
Here's my Back Encounters activation Php content is:
& lt ;? Php session_start (); Extract ($ _ request); Session_destroy (); Header ("location: login.php"); ? & Gt;
How can I get it?
You can consider making an Ajax call instead at backbuttonsessiondeactivation.php.
$ Ajax (function () {url: "http://yourwebisteurl.com/path/to/backbuttonsessiondeactivation.php",});
Comments
Post a Comment