Thanks for your help. This is one of the questions I have - Do you use
multiple cookies for one visitor? one for userid? one for a shopping
cart?
You can set different cookies for different things,
(ASP example)
response.cookies("sitename")("userid") = "12345"
response.cookies("sitename")("city")= "Glendale"
response.cookies("sitename")("color")= "blue"
With that you are setting keys for the SiteName, and you can loop through
the different values.
What triggers the "nocookies" page? Is that information gathered through
a HTTP header when a user's browser is set not to accept cookies? or
when
a cookie is refused by a user's browser? How do you test for cookies?
Am I overlooking something obvious? Excuse me if my questions are naive
but
I haven't found this information clearly stated anywhere. Thanks again.
You need to request the cookie information. In the above example,
If request.cookies("sitename").haskeys then
for each item in request.cookies("sitename")
response.write item & "=" & request.cookies(item)
next
else
'send them to a no cookie page
response.redirect "nocookies.asp"
end if
Or, you can also test for session cookies (a slightly different animal)
<a href="cookietest.asp?thesessidid=<%=Session.SessionID%>">test for
session cookies</a>
Then on cookietest.asp you test like this:
thesessionid = request.querystring("thesessionid")
if session.sessionid <> thesessionid then
response.redirect "nocookies.asp"
else
'the two equal so session cookies are enabled
'set whatever or do whatever you want here
end if
Note: the above examples are in ASP, and I'm writing them from memory, so
the code might be a little faulty. I'm sure other scripting languages are
probably similar.