I am trying to use cfscript cookies in CF10 to set a cookie that should be deleted when the browser closes. I can do this with set-headeror <cfcookie>, but could not do it with a struct cookie approach.
Does anyone know of a better workaround than using set-header? (staying inside cfscript tags)
<cfscript>
cookie.test1 = {value="hello", httponly=true};
cookie.test3 = {value="hello", httponly=true, expires="0"};
cookie.test4 = {value="hello", httponly=true, expires="-1"};
</cfscript>
<!--- Set-Cookie:TEST2=hello2; Path=/; HttpOnly --->
<cfcookie name="test2" value="hello2" httponly="true">
source
share