|
January 16, 2000 Cookies Tips: January 2000
Yehuda Shiran, Ph.D.
|
|
You can manipulate cookies in JavaScript with the document.cookie property. You can set a cookie by assigning this property, and retrieve one by reading its current value. The following statement, for example, sets a new cookie with a minimum number of attributes:
And the following statement displays the property's value:
The value of
If you want to find a cookie having a specific name, you need to parse the string and find the one matching this name. For your convenience, we provided in Column 8, Crispy JavaScript Cookies, a set of useful functions for getting and setting cookies.
People who read this tip also read these tips: Look for similar tips by subject: |