IIS ASP - cookie testing

This is Interesting: Free IT Magazines  
Home > Archive > IIS ASP > August 2006 > cookie testing





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author cookie testing
shank

2006-08-30, 1:31 pm

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

2006-08-30, 1:31 pm

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" <shank@tampabay.rr.com> wrote in message
news:OBvuDfFzGHA.3656@TK2MSFTNGP04.phx.gbl...
>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!
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com