JavaScript | Actions | CSS | Documentation |
  | Components | Databases | NAS | Links

Search the Workbench:

CFCookie allow you to set cookies on the client’s browser.

What the CFCookie component editor for the CFCookie looks like.

Syntax
<
CFCookie Name=”Cookie Name” Value=”Value” Expires=”Expiration” SECURE>

CFCookie Attributes

Name

Name of cookie

Required

Value

Cookie value

Required

Expires

Cookie expiration date

The cookie expiration date can be put in in date format, NOW, or NEVER. Optional

Path

Subset of the URL to which the cookie applies

Optional.

Domain

The domain for which the cookies are valid

Required only if Path is used

Secure

Specify that cookie must be sent securely

Optional. If specified and the browser does not support SSL then the cookie won’t be sent.

Example:
<CFCookie Name=”User_Id” Value=”100”>

Tips:

As not all browser support cookies. You must not make assumptions about the existence of the cookie. Always use the IsDefined fucntion to check for the existence of the cookie before referencing it.

Setting a cookie expiration date of NOW effectively deleted the cookie from the client’s browser.

Go Back to Previous Page

Have a question that you can´t find the answer to? Want to report a possible bug?

Send a help request to NetObjects Technical Support