Jump to content

how to read previous url when back button is pressed on browser


manuolive

Recommended Posts

Hi Dudes,

 

I have a query regarding browser url.Let me narrate the exact scenario

which i need.

 

 

I would like to expire my session when a person enters different url

in the navigator bar other than my url and comes back to my url.

For example if i visit example.com and then i type gmail in the same

navigator bar and then move back to my url example.com through browser

back button then i have to end the session of my client i mean he has

no more access to my site.

 

 

The same scenario is there for icicibank.com.

I wanna the code using php and javascript.

Please help me.

Its urgent. Expecting the favor.

Thank you

Link to comment
Share on other sites

use  $_SERVER['HTTP_REFERER'] in ur home page and check whether it matches with ur url or not if not expire the session..

 

we have tried $_SERVER['HTTP_REFERER'] but when we navigate from our site to other site the referer is not getting changed it is having our site last actioned page url.

Please suggest me any other way.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.