Same Referer URL opens for two different browser tabs with different URLs PHP -
flow:
- user visits page www.mysite.com/somepage/1 - user clicks on log out button or times out , logs out *user log out detected redirect home page save referer url *redirect /login?ref=$_server['http_referer'] (actual code test if set) - user sees login page , relogs - user redirected refere url saved in $_get['ref']
the aboe flow works perfect first browser tab, if user has multiple tabs open $_get['ref']
gets set same url set first tab. example:
example:
tab 1 : /somepage/hello/world tab 2: /another/page/1
when user logs out tab 1 gets redirected to:
/login?ref=http://site.com/somepage/hello/world (correct)
if user refreshes page on tab 2 gets redirected to:
/login?ref=http://site.com/somepage/hello/world not correct, should redirect to: /login?ref=http://site.com/another/page/1
don't redirect anywhere. handle re-login process on same url user on. keep url of every tab , browser window intact.
Comments
Post a Comment