This content has been marked as final.
Show 1 reply
-
1. Re: How can you determine from within CF if cookies are enabled in the browser you are using?
BKBK Sep 14, 2014 4:47 AM (in response to PHRED-SE)Enable session management in your Application file, with setClientCookies set to true. Then you can tell whether the client has cookies enabled by looking at the values in the cookie scope, by doing something like
<cfif isDefined("cookie.cfid") and isDefined("cookie.cftoken")>
<!--- cookies enabled --->
<cfelse>
<!--- we may assume cookies not enabled --->
</cfif>
If you are on ColdFusion 10 or 11 you should read up on the related subject of session fixation.
You might wish to avoid re-inventing the wheel. If so, you could just emulate or copy Ben Nadel's cookie test.

