How can I determine if a visitor has cookies support enabled in his/her browser? [Print this FAQ]
Answer:
There are a number of ways to determine whether or not a user has Cookies enabled in his or her browser. The simplest, and cheapest, way to accomplish this is fairly straightforward:
-- In Page1.asp create a cookie and redirect the user to Page2.asp -- In Page2.asp, check to see if the cookie exists. If it does, then the user supports cookies, else he doesn't!
A second alternative you can use to determine if a user has cookies enabled (as well as a slew of other options), you can use a third-party component, like BrowserHawk. Examples on using BrowserHawk to perform Cookie checks can be seen here. For more information on BrowserHawk be sure to read Ryan S.'s article: Browser Detection with BrowserHawk and check out the BrowserHawk Homepage!
FAQ posted by Scott Mitchell at
9/26/2000 11:03:30 PM to the
Cookies category.
This FAQ has been viewed 94,329 times.
Do you have a FAQ you'd like to suggest?
Suggestions? Comments? If so, send it in!
Also, if you'd like to be a FAQ Admin (creating/editing FAQs),
let me know! If you are looking for other FAQs, be
sure to check out the 4Guys
FAQ and Commonly Asked Messageboard Questions!