Skip to Main Content
Programming ColdFusion MX, 2nd Edition
book

Programming ColdFusion MX, 2nd Edition

by Rob Brooks-Bilson
August 2003
Intermediate to advanced content levelIntermediate to advanced
1140 pages
68h 45m
English
O'Reilly Media, Inc.
Content preview from Programming ColdFusion MX, 2nd Edition

Name

cfcookie

Synopsis

<cfcookie>

Writes a cookie to the user’s browser. Due to the way ColdFusion assembles dynamic pages, you shouldn’t attempt to use the cflocation tag within a template after a cookie variable has been set. In versions of ColdFusion prior to MX, setting a cookie variable and using cflocation afterward resulted in the cookie not being set. This is no longer the case in ColdFusion MX.

Attributes

name=" cookie_name "

Name of the cookie to write. Cookie names can consist of any printable ASCII characters with the exception of commas, semicolons, and whitespace characters. Required.

value=" value_of_cookie "

The value to assign the cookie. Required.

domain=" domains "

The domain for which the cookie can be read and written. Entries must always start with a dot. For example, domain=".oreilly.com" is a valid entry. Multiple entries may be separated by semicolons. Optional.

expires=" time_period "

The cookie’s expiration date. May be specified as a date, number of days, Now, or Never. Optional. If no value is provided for expires, the cookie is set as an in-memory-session-only cookie. This means that the cookie is never written to the user’s hard drive and automatically expires when the browser is closed.

path=" URLs "

The URLs in domain that the cookie applies to. Multiple entries can be separated by semicolons. Optional.

secure="Yes|No"

Whether the cookie must be transmitted securely via SSL. Optional. The default is No.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming ColdFusion

Programming ColdFusion

Rob Brooks-Bilson

Publisher Resources

ISBN: 0596003803Supplemental ContentErrata Page