jQuery cookie plugin is popular plugin, which is used to accomplish cookies tasks but one of the problem with this plugin is that it doesn't support JSON cookies. So what is the solution?
Dough is an easy to use cookie plugin for jQuery with powerful features. Dough can auto set your domain name with ‘.’ prefix so your cookies work with subdomains and will allow you to easily go from local to staging to product servers with out a problem.
This plugin also comes with options to play with.
- expires: Days ’til cookie expires
- path: Default is root ‘/’, set to ‘current’ to use the path of current page
- domain: Auto detect and set domain with subdomain prefix
- secure: Set to true if you’re using https://
The beauty of this plugin it also supports JSON cookies. So using this plugin, you can create JSON cookies.
Create JSON cookie