Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: The Return of the Session Variable!!!


Message #1 by srotondo@h... on Thu, 21 Nov 2002 15:05:26
I'm writing an ASP app to update an athletics schedule online.

My goal is to make this app browser independent therefore, I'm performing 
all edits on the server, not on the client (client side VB script doesn't 
work well on Macs).  My app works like this: the user enters updates via a 
form and hits submit.  The submit button fires off an edit check ASP app 
which reads fields from the form with "Request.Form("txtTeamName")." Once 
the edits are complete and there are errors, I return to the form 
application via a response.redirect.  I send error messages as well as the 
fields (txtTeamName) back to the calling program via session variables.

Here's the problem--will session variables work on any browser?  If 
cookies are disabled, will session vars still work?  To guard against 
timeout can I set the timeout parameter in my form program or do I need to 
do that in global.asa.

OR is there a better way to do this whole thing w/o session vars?  It 
seems everywhere I look there's uncertainty about session variables.

Thanks for your help.

Sal  
Message #2 by Mark Eckeard <meckeard2000@y...> on Thu, 21 Nov 2002 08:18:22 -0800 (PST)
Since session var's are done on the server side, they
are browser independant.  

I use session var's and have never had any problems. 

I always check to make sure the session is still
active at the top of each page.  That way, if a
session ends, I just kick the user out to the log in
screen and don't have to worry about session var's
being dropped.


--- srotondo@h... wrote:
> I'm writing an ASP app to update an athletics
> schedule online.
> 
> My goal is to make this app browser independent
> therefore, I'm performing 
> all edits on the server, not on the client (client
> side VB script doesn't 
> work well on Macs).  My app works like this: the
> user enters updates via a 
> form and hits submit.  The submit button fires off
> an edit check ASP app 
> which reads fields from the form with
> "Request.Form("txtTeamName")." Once 
> the edits are complete and there are errors, I
> return to the form 
> application via a response.redirect.  I send error
> messages as well as the 
> fields (txtTeamName) back to the calling program via
> session variables.
> 
> Here's the problem--will session variables work on
> any browser?  If 
> cookies are disabled, will session vars still work? 
> To guard against 
> timeout can I set the timeout parameter in my form
> program or do I need to 
> do that in global.asa.
> 
> OR is there a better way to do this whole thing w/o
> session vars?  It 
> seems everywhere I look there's uncertainty about
> session variables.
> 
> Thanks for your help.
> 
> Sal  


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus ? Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
Message #3 by pgtips@m... on Fri, 22 Nov 2002 09:18:25
Its not difficult to test this out :-)  If you do you'll find session vars 
do depend on cookies - if user disables cookies your session vars will no 
longer work.

The main reason session vars are unpopular is that they stay alive for the 
whole timeout period (unless the session is explicitly abandoned) whether 
or not the user is still browsing your site.  This can clog up a webserver 
under heavy load.  May or may not be an issue for you depending on what 
you store in the session and how much load you expect.  If you do use 
sessions be careful what you store in them.  e.g. don't store any ADO 
objects.

A way to maintain state without cookies/sessions is to store the info in a 
db and just pass the key around your pages.

hth
Phil
>----------------------------------------
> Here's the problem--will session variables work on any browser?  If 
> cookies are disabled, will session vars still work?  

  Return to Index