cookie testing

Discussion in 'ASP General' started by shank, Aug 30, 2006.

  1. shank

    shank Guest

    I need to revisit cookie testing. On the home page and every product page I
    write a cookie. I do this because some users enter by direct links to
    product pages.

    <%
    Response.Cookies("cookietest") = ("49")
    Response.Cookies("cookietest").Expires = Date + 2
    %>

    On the cart page I test for the cookie...

    <%
    If Request.Cookies("cookietest") <> "49" Then
    Response.Redirect("err.asp?e=1")
    End If
    %>

    I have a user that insists he has cookies enabled, yet he keeps getting
    redirected to my error page which suggests he does not have cookies enabled.
    What could cause this? Is the above too simple for all circumstances?

    Is there more extensive code that I could setup on a hidden page where I can
    send users to get read out on how they actually have their browsers setup?
    i.e. Run a test on their browser and the results are emailed to me.

    thanks!
    shank, Aug 30, 2006
    #1
    1. Advertising

  2. shank

    Jay Guest

    Whenever i use cookies, i ues this....


    Response.Cookies("cookietest") = "49"
    Response.Cookies("cookietest").Expires = Date + 2


    Try that, it might help i hope


    James Jones




    "shank" <> wrote in message
    news:...
    >I need to revisit cookie testing. On the home page and every product page I
    >write a cookie. I do this because some users enter by direct links to
    >product pages.
    >
    > <%
    > Response.Cookies("cookietest") = ("49")
    > Response.Cookies("cookietest").Expires = Date + 2
    > %>
    >
    > On the cart page I test for the cookie...
    >
    > <%
    > If Request.Cookies("cookietest") <> "49" Then
    > Response.Redirect("err.asp?e=1")
    > End If
    > %>
    >
    > I have a user that insists he has cookies enabled, yet he keeps getting
    > redirected to my error page which suggests he does not have cookies
    > enabled. What could cause this? Is the above too simple for all
    > circumstances?
    >
    > Is there more extensive code that I could setup on a hidden page where I
    > can send users to get read out on how they actually have their browsers
    > setup? i.e. Run a test on their browser and the results are emailed to me.
    >
    > thanks!
    >
    Jay, Aug 30, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben
    Replies:
    3
    Views:
    5,831
    Steven Cheng[MSFT]
    Jun 3, 2004
  2. Shapper

    Cookie and Session Cookie Questions.

    Shapper, Apr 27, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    562
  3. =?Utf-8?B?UGF1bA==?=

    Cookie Question (IP as domain and cookie file location)

    =?Utf-8?B?UGF1bA==?=, Jan 10, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    2,471
    Bruce Barker
    Jan 10, 2006
  4. ad
    Replies:
    2
    Views:
    7,498
    Kevin Spencer
    Jan 27, 2006
  5. =?Utf-8?B?TnVubw==?=

    Convert a PHP cookie to an ASP.NET cookie

    =?Utf-8?B?TnVubw==?=, Jan 31, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    437
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Jan 31, 2006
Loading...

Share This Page