Simple Cookies Question :

Results 1 to 2 of 2

Thread: Simple Cookies Question :

  1. #1
    Join Date
    Dec 1969

    Default Simple Cookies Question :

    I would like to give users my own warning that they need to have cookies enabled to use a site, but only if they have disabled cookies in their browser. Is there a foolproof way of doing this?

  2. #2
    Join Date
    Dec 1969

    Default Of course

    Set a cookie, redirect to another page, request the cookie. If it&#039;s empty --&#062; no cookies enabled.<BR><BR>default.asp:<BR><BR>Response.Cooki es("CookieTest") = "TEST"<BR>Response.Redirect("cookietest.asp")<BR>< BR>cookietest.asp:<BR><BR>IF LEN(Request.Cookies("CookieTest")) &#062; 0 THEN<BR> &#039;cookies are enabled<BR> &#039;redirect to your default page<BR><BR>ELSE<BR> &#039;cookies are disabled<BR> &#039;display warning<BR>END IF<BR><BR> <BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts