Cookies are a great way to remember visitors, and to store variables from page to page.
[setcookie name=cookieName&value=cookieValue&expires=expireDate&path=/&domain=yourdomain.com]
[setcookie name=Member&value=T&expires=Wednesday, 09-Nov-2008 23:12:40 GMT&path=/&domain=yourdomain.com]
[setcookie name=cart&value2515983408&expires=[format days_to_date %A, %d-%b-%Y][math]{[date]}+7[/math][/format] [math time]{[time]}+{05:00:00}[/math] GMT&path=/&domain=yourdomain.com]
[listcookies]
[index], [name], [value]<br>
[/listcookies]
[listcookies name=text&exact=F]
[index],[value]<br>
[/listcookies]
Parameter | Description |
---|---|
Name | (optional) The name of the cookie to list. |
Exact | T or F (optional) Whether to exactly match the cookie name or return any cookie name that contains the "name" value. (Default value is T.) |
Tag | Description |
---|---|
[name] | The name of the cookie. |
[value] | The value associated with the cookie. |
[index] | A number indicating this cookie's placement in the list. |
It is important to understand that when you set a cookie on a page, it is NOT available via [getcookie] further down in the same page. Only when the user accesses the NEXT page does the cookie become available. For this reason, [redirect [thisurl]] is often used immediately after setting a cookie to make it available.
Parameter | Description |
---|---|
HttpOnly | (optional) HttpOnly should be T, just like Secure. It adds a HttpOnly to the cookie, and treats everything else as a F. |
MaxAge | MaxAge should be a date just like Expires. It adds a Max-Age= to the cookie |
Raw | RAW lets you add anything you want to the cookie. You can use it conjunction with the other parameters or in place of them. You must still specify a name and value. Separate multiple raw parameters with a semi-colon and a space. For example: [setcookie name=cookieName&value=cookieValue&HttpOnly=T&Raw=domain=example.com; secure] or [setcookie name=cookieName&value=cookieValue&Raw=domain=example.com; secure; HttpOnly] |
DOWNLOAD WEBDNA NOW!
Amazon Web Services (AWS) README for Machine Image ID...
Download WebDNA ApplicationsWebDNA applications...
Tips and TricksA list of user-submitted tips ...
WebDNA ModulesA list of the currently available modules...
WebDNA LibrariesA list of available libraries for WebDNA...
Technical Change HistoryThis Technical Change History provides a reverse chronological list of WebDNA changes...
WebDNA provides a few options for password protecting your pages...
[elapsedtime]...
[copyfolder]Copy a folder and all its contenton your webspace...
[SQL]Performs a SQL statement on an ODBC data source...
[getmimeheader]Displays a specific MIME header...
[movefile]This instructions move a file from one location to another...