Devone

Can I Use jQuery to Read and Write Cookies to a User's Browser?

Asked by Devone 2 years ago jquery browser cookies


Neil Monroe
0
 
Using this simple plugin for jQuery, you can read and write cookie values.

From the docs:

Set the value of a cookie:
$.cookie('the_cookie', 'the_value');

Create a cookie with all available options:
$.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: True });

Create a session cookie:
$.cookie('the_cookie', 'the_value');

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.
$.cookie('the_cookie', null);

by Neil Monroe 2 years ago

Answer this question

Can I Use jQuery to Read and Write Cookies to a User's Browser?

0 errors found:

 
0