Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

When is session COOKIE created?

2 posts in General Discussion (old) Last posting was on 2000-03-02 06:21:26.0Z
Jim Helwig Posted on 2000-03-01 21:37:57.0Z
Newsgroups: sybase.public.easerver
Date: Wed, 01 Mar 2000 15:37:57 -0600
From: Jim Helwig <jwhelwig@qgraph.com>
X-Mailer: Mozilla 4.72 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: When is session COOKIE created?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: 161.49.5.144
Organization: Quad/Graphics,Inc.
Lines: 36
NNTP-Posting-Host: dns2.qgraph.com 206.158.124.2
Message-ID: <347_38BD8DB5.B51667A3@qgraph.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!news.qgraph.com!161.49.5.144
Xref: forums-1-dub sybase.public.easerver:27391
Article PK: 154532

I am currently using IIS and PowerDynamo and I am interested in using
the session cookie as part of a key when storing session data. I have
noticed that the cookie is not always immediately available during the
server-side processing of the first page request. If that first page
does a server-side redirect to a sencond page, the cookie seems to be
available during the server-side processing of the second page.

Is the cookie created AFTER serving up the first page?
Is it available after a certain amount of time has elapsed?

If the first is true, I can simply redirect to a second page before
using the cookie. If the second is true, I have no guarentees of when I
can depend on the cookie being available.

Jim

------------------------------------------------------
To test this, load the page below in a new session.

<!--SCRIPT PSOBJMOD=TRUE
import( site.GetRootDocument().location + "/ObjMod.ssc" );
session.active = true;
InitObjects(session);
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<META CONTENT=0 HTTP-EQUIV=expires>
</HEAD>
<BODY>
<!--SCRIPT
session.timeOut = 2;
psDocument.WriteLn("Cookie[" + psDocument.GetEnv("COOKIE") + "]<br>");
-->
</BODY>
</HTML>


Scott McReynolds [Sybase] Posted on 2000-03-02 06:21:26.0Z
Newsgroups: sybase.public.easerver
From: "Scott McReynolds [Sybase]" <scottmc@sybase.com>
Subject: Re: When is session COOKIE created?
Date: Wed, 1 Mar 2000 23:21:26 -0700
Lines: 49
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: scottmc-pc.sybase.com 158.77.55.90
Message-ID: <347_NnqTEABh$GA.251@forums.sybase.com>
References: <347_38BD8DB5.B51667A3@qgraph.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27359
Article PK: 158769

Jim,

You are correct, the session cookie is created after the session object is
created on the client. This is done usually after the first page is served
up. you can timeout the session cookie by specifing the timeout parm on the
session object.

Scott

Jim Helwig <jwhelwig@qgraph.com> wrote in message
news:38BD8DB5.B51667A3@qgraph.com...
> I am currently using IIS and PowerDynamo and I am interested in using
> the session cookie as part of a key when storing session data. I have
> noticed that the cookie is not always immediately available during the
> server-side processing of the first page request. If that first page
> does a server-side redirect to a sencond page, the cookie seems to be
> available during the server-side processing of the second page.
>
> Is the cookie created AFTER serving up the first page?
> Is it available after a certain amount of time has elapsed?
>
> If the first is true, I can simply redirect to a second page before
> using the cookie. If the second is true, I have no guarentees of when I
> can depend on the cookie being available.
>
> Jim
>
> ------------------------------------------------------
> To test this, load the page below in a new session.
>
> <!--SCRIPT PSOBJMOD=TRUE
> import( site.GetRootDocument().location + "/ObjMod.ssc" );
> session.active = true;
> InitObjects(session);
> -->
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
> <HTML>
> <HEAD>
> <META CONTENT=0 HTTP-EQUIV=expires>
> </HEAD>
> <BODY>
> <!--SCRIPT
> session.timeOut = 2;
> psDocument.WriteLn("Cookie[" + psDocument.GetEnv("COOKIE") + "]<br>");
> -->
> </BODY>
> </HTML>