You are here: System » JQueryPlugin » JQueryCookie


12 Feb 2010 - 10:11 | Version 1 |

Author(s): Klaus Hartl, Uzbekjon
Version: 20100921

Easy cookie handling using jQuery.


  • $.cookie('the_cookie');: return the value of the cookie
  • $.cookie('the_cookie', 'the_value');: set the value of a cookie
  • $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: '', secure: true });: create a cookie with all available options.
  • $.cookie('the_cookie', null);: delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain used when the cookie was set.


  • expires: either an integer specifying the expiration date from now on in days or a Date object. If a negative value is specified (e.g. a date in the past), the cookie will be deleted. If set to null or omitted, the cookie will be a session cookie and will not be retained when the the browser exits.
  • path: the value of the path atribute of the cookie (default: path of page that created the cookie).
  • domain: the value of the domain attribute of the cookie (default: domain of page that created the cookie).
  • secure: if true, the secure attribute of the cookie will be set and the cookie transmission will require a secure protocol (like HTTPS).

Contact Us

Atomikos Corporate Headquarters
Hoveniersstraat, 39/1, 2800
Mechelen, Belgium

T +3215613055

Subscribe to our newsletter

Never miss an update

Copyright 2015 Atomikos BVBA