jquery - How to clear cookies in javascript without keeping any expiry time -
this question has answer here:
- how delete cookie? 6 answers
how clear cookies out keeping expiry time.
i have created cookie this
document.cookie = "visited=yes";
i need remove cookie.
how can that..?
thanks in advance
usually update cookies expiry time delete it.
document.cookie = "expires=thu, 01 jan 1970 00:00:00 gmt";
you can write empty cookie reset it's values:
document.cookie = "key=";
Comments
Post a Comment