|
Posted by Adrienne on 08/05/05 02:52
Gazing into my crystal ball I observed "Ale"
<_cutbetweenunderscores_theopps75@ya_ho_hoo.it> writing in
news:dct92e$aah$1@gwdu112.gwdg.de:
> yep... they are different... and yes I wanted try to operate on the
> server side because I cannot rely on client scripting because I want to
> have a solution for bot, not for users... I can handle them.
> However, frame not frame... I got the points... now I wil adpot the
> above mentioned solution as buffer till I will have the time to convert
> the structure.
>
> Session<->Cookies... thanks for the suggestion. As I said before I need
> to check more literature. I still do not understand this point. I
> always avoided coockies in my websites. For this sometimes I was
> relying on session variables. And they always worked with whatever
> browser... I never had a single complain, from both Mac and Win
> users....
>
> Thanks a lot
> Ale
>
>
Sessions ARE cookies, but are not persistant. A persistant cookie is one
that has an expiration date, one that does not lives for the life of the
session, hence it is called a "session cookie".
You set a persistant cookie like:
<% response.cookies("mycookie") = "chocolate"
response.cookies("mycookie").expires = date() + 2 'expires in two days
%>
You set a session cookie like:
<% session("mycookie") = "vanilla" %>
Or:
<% session("mycookie") = request.cookies("mycookie") 'will set session
cookie to chocolate if the user's cookie value is chocolate %>
However, to a user agent, a cookie is a cookie, and if the user agent does
not or cannot accept any cookie, then your sessions don't even get to the
oven, let along get baked.
Here's a good test to see if a session cookie is available:
*** page1.asp ***
<p>The session id is: <%=Session.SessionID%><br>
<a href="page2.asp?test=<%=Session.SessionID%>">Go to Page 2</a></p>
*** page2.asp ***
<p>The session id is: <%=Session.SessionID%><br>
The session id from page one is : <%=request.querystring("test")%></p>
--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Navigation:
[Reply to this message]
|