This function is used to set and delete outgoing HTTP cookies that can be sent from the CFML application. You can read cookies using the 'cookie' variable scope. Cookies are limited to 20 per domain, each one being a maxium of 4KB in size.


BOOLEAN = SetCookie( name, value, expires, path, domain, secure, httponly )
Argument Summary
name The NAME of the cookie. OpenBD will automatically convert this to UPPERCASE
value The value of this cookie. This value will be automatically encoded for you. You can omit this parameter if you are deleting the cookie. Value cannot be more than 4096 bytes in size [optional]
expires How long do you want this cookie to persist for. You can pass in a date in the future, or the number of seconds from this time on, or 'NEVER' if you want to cookie to persist as long as possible. If you specify 'NOW' this expires the cookie immediately. If don't specify a value, it will die when the user kills the browser window. [optional]
path The scope of the path that this cookie will be sent back to the browser for [optional]
domain The sub-domain that this cookie will be set for [optional]
secure Flag to determine if the cookie should only be sent on a secure connection [optional]
httponly Flag to advise the browser that this cookie should not be accessible from Javascript [optional]


Supports named-parameter calling allowing you to use the function like:


Supports passing parameters as a structure using ArgumentCollection:

SetCookie( ArgumentCollection={
   name : ?, 
   value : ?, 
   expires : ?, 
   path : ?, 
   domain : ?, 
   secure : ?, 
   httponly : ?
} );