View Full Version : Resolved jQuery Cookies plugin

12-25-2008, 07:21 PM
Hi, I want to use cookies with a script I wrote with jQuery but I don't know which plugin to use. I have found these two:
http://plugins.jquery.com/project/cookies (http://plugins.jquery.com/project/cookies)
http://www.stilbuero.de/2006/09/17/cookie-plugin-for-jquery/ (http://www.stilbuero.de/2006/09/17/cookie-plugin-for-jquery/)

Since I don't know much JavaScript and I only started with jQuery a couple of weeks ago I don't really know what to look at. Which cookies plugin would you use with jQuery?

12-26-2008, 02:00 PM
We won't know which you should use until you tell us what script you made.

12-26-2008, 02:52 PM
They both do the same thing, but the first one has multiple functions (get, set, del) and the second has one function (cookie). Also the first plugin has extra features, such as test if the browser is accepting cookies, or you can 'bind' an input to a cookie (more on that here (http://code.google.com/p/cookies/wiki/Documentation#With_jQuery)). Ultimately it is your choice.

12-26-2008, 03:01 PM
I posted the script in this thread since I'm having some problems with it:
http://www.dynamicdrive.com/forums/showthread.php?p=176966#post176966 (http://www.dynamicdrive.com/forums/showthread.php?p=176966#post176966)

What I need the cookies for is to save the results (points, breaks, etc) so they don't disappear when the user refreshes the browser. Thanks for your help!