472,119 Members | 1,241 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

cookie testing

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!
Aug 30 '06 #1
1 1330
Jay
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" <sh***@tampabay.rr.comwrote in message
news:OB**************@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!

Aug 30 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Henry Hartley | last post: by
6 posts views Thread by Ajay | last post: by
12 posts views Thread by George Hester | last post: by
2 posts views Thread by Athmaus | last post: by
4 posts views Thread by socialism001 | last post: by
reply views Thread by Bennett F. Dill | last post: by
3 posts views Thread by Ben | last post: by
2 posts views Thread by kelly.pearson | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.