jQuery
How To Expire Session on Browser Tab is Closed

How To Expire Session on Browser Tab is Closed

By: SolutionsHint    28 views Updated: 05th Sep, 2018
How To Expire Session on Browser Tab is Closed

Hello everyone, in this post I will explain which is most important question asked by millions of people on StackOverflow and on Quora, that How to expire session on browser tab is closed, but could not find the exact solution for that, but in this article I will give you the best and tested code using jQuery that will definitely help you expire your application session on Browser Tab is Closed. because attacker always tries to hack your application fromour your small mistakes.

Why Need to Expire session on Browser Tab is Closed

sometimes we access applications from cyber cafe, friends home, office and forgot to log out properly, then, in this case, other guys may access your profile and application from history because of you have not log out properly.  so here i will give you the best and running code that will you to secure your web application.

How to Expire Session on Browser Tab is Closed

I am using PHP Web application so for I will explain according to PHP architecture. but this is jQuery code that will help with all types of application.

Notes:  Just go to your file directory and find your header.php and paste same code will start work!!!

Notes: URL will be your logout URL path

Anything else let me know, I am ready to help at any time anywhere!!

 

About the Author

I am a professional blogger from my heart, I am going through all the possible ways that can help to audience. I am trying my best to write content that my readers will like me. I will really be happy when my readers will become more happy with my blog.

1 thought on “How To Expire Session on Browser Tab is Closed”

Leave a Reply

Your email address will not be published. Required fields are marked *