Cookies in the built-in browser it's weird.
This is the code to set up and delete cookies
function set_cookie($var ,$value = '' ,$expire = 0){$path = '/';$domain = 'aaa.com';$auth = 'sadfsadfasdf';if($value!='') $value = _myencrypt($value ,$auth);$var = '__abc_'.$var;if($expire==0){ $expire = 0;}else if($expire > 0){ $expire = __TIME__ + (86400*$expire);}else{ $expire = $expire * 86400;}setcookie($var ,$value ,$expire ,$path,$domain);unset($var ,$expire ,$path ,$domain);}function delete_cookie($var){$path = '/';$domain = 'aaa.com';$expire = __TIME__ - 2592000;if(is_array($var)){ foreach($var as $val){ $var = '__abc_'.$val; setcookie($var ,'' ,$expire , $path,$domain); }}else{ setcookie('__abc_'.$var ,'' ,$expire , $path,$domain);}unset($path ,$expire ,$domain);}
It's not a problem in a normal browser.
But with the opening of this site, login no problem, but the exit is not, have been unable to delete cookies ...
Or a split-time, yesterday I remember can be again ...
Neither iOS nor Android.
Reply content:
Cookies in the built-in browser it's weird.
This is the code to set up and delete cookies
function set_cookie($var ,$value = '' ,$expire = 0){$path = '/';$domain = 'aaa.com';$auth = 'sadfsadfasdf';if($value!='') $value = _myencrypt($value ,$auth);$var = '__abc_'.$var;if($expire==0){ $expire = 0;}else if($expire > 0){ $expire = __TIME__ + (86400*$expire);}else{ $expire = $expire * 86400;}setcookie($var ,$value ,$expire ,$path,$domain);unset($var ,$expire ,$path ,$domain);}function delete_cookie($var){$path = '/';$domain = 'aaa.com';$expire = __TIME__ - 2592000;if(is_array($var)){ foreach($var as $val){ $var = '__abc_'.$val; setcookie($var ,'' ,$expire , $path,$domain); }}else{ setcookie('__abc_'.$var ,'' ,$expire , $path,$domain);}unset($path ,$expire ,$domain);}
It's not a problem in a normal browser.
But with the opening of this site, login no problem, but the exit is not, have been unable to delete cookies ...
Or a split-time, yesterday I remember can be again ...
Neither iOS nor Android.
The cookie is not persistent, and as far as I can test it, sometimes it is closed and then opened. The exact time saved in Android and IOS may vary.
Previously wanted to use a cookie to distinguish between unique users, and later found no. But there is no service number to do oauth authorization, really headache for a while. Later found this, solved my problem:
Gate of api:http://wgate.gaitianxia.com/
I also encountered the same problem, is not delete cookies, annoying!
But now found that his cell phone will be like this, the others will not, my phone parameters:
Lt22i
Android 4.1.2 (Kernel 3.0.8+)
Version 6.2.4
And the cookie can also be duplicated, JS modified the value of the cookie, the original value of the cookie will also be effective, alert after the show "cityid=3;cityid=13;", so backstage get still cityid=3, too weird. All other browsers are normal.
function delCookie(name){ document.cookie = name + "=; expires=Thu, 01 Jan 1970 00:00:01 GMT";}
This method is used to delete cookies normally