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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.