Jquery plugins recommend jquery.cookie

  • 2020-03-30 04:16:48
  • OfStack

Comprehensive overview

Handling cookies with native JavaScript is a headache, and jQuery itself doesn't have a function for handling cookies,
However, this extremely small (approximately 500 bytes compressed) jquery plug-in can be used to handle the read, write, and delete of cookies.

compatibility

IE6+, Chrome, Firefox, Safari, Opera

Frame dependence

Dependency framework: jQuery1.0+

Used to introduce

1. Cookie is created by the $.cookie. Write method. The sample code is as follows:

$.cookie. Write ('cookie_name', 'cookie_value', 24 * 60 * 60);
2. The cookie is read by the $.cookie. Read method. The sample code is as follows:

$. Cookies. Read (' cookie_name)
3. Delete the cookie through the $.cookie. Destory method.

$. Cookies. Destroy (' cookie_name)
Download link

(link: https://github.com/stefangabos/Zebra_Cookie/)

Authorization information

License type: LGPL

Authorization type information: (link: https://github.com/stefangabos/Zebra_Cookie/blob/master/license.txt)

Change log

(link: http://stefangabos.ro/jquery/zebra-cookie/#changelog)

Other supplementary

A very good plug-in, worth recommending


Related articles: