Jquery's cookies plug-in feels good, but when tracking and debugging, I found that the cookies still have a value with the same name, which is troublesome. Later I saw someone on the internet saying that I used this method, it seems pretty good to use JS to write cookies. It is hard to say that it is simple or simple. Simply put, it is simply a document. cookie = .., I wrote it directly. The difficulty is that some keys in cookies already exist. I want to rewrite them with JS. At this time, you use document. when the cookie is written, the key is directly re-written. Sometimes, writing fails (sometimes the characters that require the escape function will appear, the specific reason is unclear). It is very troublesome. Later, I saw the Jquery cookies plug-in, which seems to be good. However, during tracking and debugging, I found that the cookies still contain a value with the same name, this is troublesome. Later I saw someone on the internet saying that using this method is not bad.
$. Cookie ('key', '', {expires:-1, path: '/'}); you can delete the value to be reset, not bad
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service