Can jQuery read/write cookies to a browser?

The default JavaScript “API” for setting a cookie is as easy as:

document.cookie="mycookie=valueOfCookie;expires=DateHere;path=/"

Use the jQuery cookie plugin like:

$.cookie('mycookie', 'valueOfCookie')

Leave a Comment