n cookie is a persistent value that can be kept on the client's machine across multiple client sessions. You can set an expiry time on a cookie so its value will persist until the time is up, regardless of whether the user has closed the browser or not.
Variable |
Value/meaning |
Access |
cookie%name:
or cookie%name:value |
The value of the cookie being stored in the client's machine for later retrieval. (Although cookie values are supposed to be encoded, this is done implicitly in the system so you are free to use even white-spaces, semi-colon and comma.
Accessing the "value" element of cookie%name will trigger the cookie operation. (Other cookie elements are no more than those of an "ordinary" class, except that their values are used in the cookie operation when the "value" element is being accessed).
You can only set or clear a cookie's value before the first display (even before the <html> tag). Also, the change does not take effect until after the page run. (For the very page run, you need to refer to the source of the new value direct.) |
get set |
cookie%name:expire |
The expiry time (on the client's machine) in timestamp format (seconds since 1 Jan, 1970 GMT) |
get set |
cookie%name:path cookie%name:domain cookie%name:secure |
The "path" parameter of the cookie The "domain" parameter of the cookie non-zero if SSL is required |
get set |
"session" class is implemented with a cookie internally but the "session" class and the "cookie" class are completely independent. They only happen to be implemented by a common technology called "cookie".
|