Store/Retrieve/Verify/Replace/Remove JSON In Cookies - jQuery SuperCookie

File Size: 10.1 KB
Views Total: 2181
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Store/Retrieve/Verify/Replace/Remove JSON In Cookies - jQuery SuperCookie

SuperCookie is a jQuery cookie manipulation plugin for JSON that allows you to write, read, verify, replace, delete JSON data in Cookies.

How to use it:

1. Load the needed jQuery library, jQuery cookie plugin, and JSON3 in the html document.

<script src="/path/to/jquery.min.js"></script>
<script src="/path/to/jquery.min.js"></script>
<script src="/path/to/jquery.min.js"></script>

2. Download and load the SuperCookie in the document.

<script src="/path/to/jquery.SuperCookie.min.js"></script>

3. Store JSON values in the cookies.

  expires: 7,
  path: "/",
  // more jquey.cookie plugin options
  // more values here

4. Check if cookie exists.


5. Verify cookie values.


6. Read cookie values.


7. Retrieve cookie values as a JSON object.


8. Retrieve a single cookie value.


9. Replace a cookie value.


10. Add a new cookie value.


11. Remove a cookie value.


This awesome jQuery plugin is developed by tantau-horia. For more Advanced Usages, please check the demo page or visit the official website.