mrblah
mrblah

Reputation: 103507

Creating a cookie using jquery to store name/value pairs of information

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?)

Upvotes: 5

Views: 18944

Answers (2)

brendan
brendan

Reputation: 29976

Upvotes: 12

Matt Ball
Matt Ball

Reputation: 359816

  1. jQuery Cookies plugin makes life easy.

  2. Cookies live on the client's computer, not the server. There is no need to postback when manipulating cookies.

Upvotes: 2

Related Questions