javascript - Why duplicate HostOnly JS Cookies aren't being removed by host? -


i'm trying clean-up duplicate cookies. issue initially, these cookies scoped current sub-domain set them. changed scope of these cookies globally scoped domain. left duplicate cookies different domains scoped. wanted remove these domain scoped cookies code doesn't work unless "hostonly" flag manually deactivated? thought if same domain set cookies, served code remove cookies wouldn't have worry "hostonly" flag? doesn't appear true? understand why isn't deleting cookies , how/if can?

try{ function clearcookie(name, domain, path){ var domain = domain || document.domain; var path = path || "/"; document.cookie = name + "=; expires=thu, 01 jan 1970 00:00:01 gmt; domain=" + domain + "; path=" + path; };  clearcookie("visitcount","www.mysite.com","/"); clearcookie("lastvisit","www.mysite.com","/"); clearcookie("visitedpreviously","www.mysite.com","/"); clearcookie("navelemname","www.mysite.com","/"); clearcookie("s_uniqueuserid","www.mysite.com","/"); clearcookie("pcidset","www.mysite.com","/");  document.cookie = "cookiescleaned=1; path=/; domain=.mysite.com"; }catch (e) {} 


Comments

Popular posts from this blog

php - Passing multiple values in a url using checkbox -

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -