On 12/27/01, Troy Montour penned:
>I was wondering if there is a way to detect if someone has cookies
>enabled.
>
>reason I'm asking is I have a site that sets a cookie and we are having
>problems when people have cookies disabled when its another dealer of
>the site it defaults to the main site and not the dealers which is very
>bad.
>
>so I was thinking if I could detect if they had cookies disabled then do
>this which would set a var with the right information.

This isn't OT I don't think. :)

I'm not exactly sure what your sequence of events will be, but the 
one constant is, we can't do a cflocation on the same page where the 
cookie is set.

So, what you can do is test for the existence of a cookie and do 
whatever you like based on the cookie value if it DOES exist. If it 
doesn't exist you can set a test cookie then have a link to a page 
that tests for that.

Page 1:
<CFIF isDefined('cookie.somecookie')>
Do a cflocation or give a link to some page based on the cookie value 
passing along the value of the cookie if you like.
<cfelse>
<cfcookie name="testcookie" value="yes" expires = "1">
Give a link here to a page that tests for the test cookie we just set.
</CFIF>

Test for cookie page:
<CFIF isDefined('cookie.testcookie')>
Cookies are enabled.
<cfelse>
Cookies not enabled. Pass cfid and cftoken on every link thereafter.
</CFIF>

-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to