jquery Action Cookie

Source: Internet
Author: User

First of all, a plugin that references JQ jquery.cookie.js

1<span style= "font-size:14px" >$.cookie (' The_cookie ', ' the_value ');//New Cookie
2 $.cookie (' The_cookie ',NULL);//Delete a cookie</span>

<span style= "font-size:14px" >$.cookie (' The_cookie ');//Read Cookie value
$.cookie (' The_cookie ', ' the_value ');//set the value of a cookie
$.cookie (' The_cookie ', ' The_value ', {expires:7, path: '/', Domain: ' jquery.com ', secure:true});//Create a new cookie including the validity path domain name </span> 

Browser cookies typically have the following four customizable properties:
1. Expires
expiration time, which is the time of the cookie's death.
If a cookie is not expires, the cookie disappears after the browser is closed.
cookies can survive to expires time and expire automatically and disappear.
2. Path
3. Domain
4. Secure

JQuery Action Cookie

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.