I need to store a cookie that has the following information:
key1: datetime key2: datetime key3: datetime
How can i create and access the cookie with the above properties?
I need to manipulate this cookie via javascript (I am using jquery).
(side question, javascript cookie work is 'live' correct? i.e. it doesn't need a postback to change cookie values etc?)
You don't need jQuery to read/write cookies. You can use plain javascript. Some good examples are here: http://www.quirksmode.org/js/cookies.html
You can use this jQuery plugin to make getting and setting cookies a little easier:
http://plugins.jquery.com/project/Cookie
jQuery Cookies plugin makes life easy.
Cookies live on the client's computer, not the server. There is no need to postback when manipulating cookies.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With