Jquery Cookie Operation Code _jquery

Source: Internet
Author: User
Using JS to write cookies is difficult to say simple and simple, said simple is direct document.cookie= ..., directly written, said that the difficulty is that some key cookies have been, is to use JS to rewrite this time you use Document.cookie to write directly to the key to write again, and sometimes will not be successful write the situation (sometimes write needs escape function characters will appear, the specific reason is not clear), anyway is very troublesome, Later saw jquery cookies plug-in, it feels good, but when the tracking debugging found cookies above or write a value of the same name, which is troublesome, and then see someone on the Internet to say this method, feel good

$.cookie (' key ', ', {Expires:-1, Path: '/'}); The value you want to reset is removed.

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.