O'Reilly logo

Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started by Charlie Arehart, Raymond Camden, Ben Forta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Gaining More Control with <cfcookie>

You already have learned how to set cookies using the <cfset> tag and the special COOKIE scope (Listings 20.1 to 20.3). Using that technique, setting cookies is as simple as setting normal variables. However, sometimes you will want more control over how cookies get set.

Introducing the <cfcookie> Tag

To provide you with that additional control, ColdFusion provides the <cfcookie> tag, which is an alternative syntax for setting cookie variables. Once set, you can access or display the cookies as you have learned so far, by referring to them in the special COOKIE scope.

Table 20.2 introduces the attributes available when using <cfcookie>.

Table 20.2. <cfcookie> Tag Syntax
AttributePurpose
NAMERequired. The name ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required