javascript - How to set cookie based on browser tab -
in application have set cookie
if(!isset($_cookie["uk_redirect_flag"])) { setcookie("uk_redirect_flag", 1, time() + (86400 * 30), "/"); }
so if uk_redirect_flag = 0 i'm showing flash message. if uk_redirect_flag =1 flash message wont display. working in 1 tab on firefox. problem when open tab on firefox uk_redirect_flag value still 1. need delete cookie when open new tab or close tab. how set cookie value based on browser tab?
that's not possible since cookie defined path, means browser tabs , windows 1 user share same cookie.
you try proposed solution: how differ sessions in browser-tabs? ir propose use local storage.
Comments
Post a Comment