In ColdFusion 10, script version for CFCOOKIE introduced. We can set cookie by cfscript in ColdFusion 10 as follows.
In the above code two ways are quite similar, here we are creating a structure where the key of the structure is exactly same as the attributes of the cfcookie tag. If we are using cfscript to set cookie then we don't need to set name of the cookie in the structure as we usually do for cfcookie.
Also in ColdFusion 10, two new attributes added for setting cookie. These are follows:
preserveCase : Specify if you want to make cookie name case sensitive. This is an optional parameter and default value is "false."
encodeValue : Specify if cookie value should be encoded. This is an optional parameter and default value is "false".
Hope it will help you.
No comments:
Post a Comment