Ads by Google

Manage cookies using jQuery


Many projects that require the use of cookies are also applied in JavaScript. jQuery has not made a solution for this, but CreativForm has decided to offer you a small but clever script that you can use in your projects.


$.cookie( ‘name’, ‘content or value’, options);

How do you use this?

This function is made to be easy to use and to work independently, but there are still things that you’ll need to do by yourself.


These are simple examples on how to use this function.

As you can see, you have full control over your cookies and you don’t need any additional knowledge on how to use this function.

Finally, we will give you a list of the other options that this function uses:

  • expires – this defines the Cookie’s expiration time in days. If this is not defined, then the cookie will expire when you close your browser.
  • domain – this defines the domain where you want to use your cookies. This is great to use if you have many subdomains
  • path – this defines the path (folder) where the cookie is defined on the server.
  • secure – if you put “true” then the cookie is available only while using HTTPS

If you need any help or assistance, please contact us.

Manage cookies using jQuery
Article Name
Manage cookies using jQuery
Get the best function to manage cookies using jQuery.