Results 1 to 6 of 6

Thread: Do session variables write anything to the drive?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141

    Do session variables write anything to the drive?

    As the subject indicates, is anything written to the users machine or are these bits of information just held in memory?

  2. #2
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141
    I am not sure what is written, but there is something because the user has to have session cookies enabled in their browser for session variables to work.
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

  3. #3
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861
    Cookies are written to the users temp directory.
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  4. #4
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131
    A Session cookie that holds the session id is placed on the users machine.

    All the Session variables are held in the memory on the web server (at least this is the case with traditional ASP not ASP.NET - I presume you are talking about standard ASP).

    As the session variables are held in the servers memory it is a bad idea to hold alot of information in the Session object if there are alot of users accessing the website simultaneously.

    An example of this is if you have 1Kb of Session data for each user then 10,000 simultaneous sessions would mean roughly 10,000Kb or 10Mb of info stored in the server memory.

    If its only a small amount of data or small amounts of traffic on the website then using the Session would be ok. It all depends on your usage.

    DJ

  5. #5
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Arrow

    so basically you don't need the user's browser to have the cookies enabled.

    Abhijit

  6. #6
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141
    They have to have session cookies enabled. There are 2 settings (in IE, but I susspect all browsers) one for real persistant cookies and the other for session cookies. Sessions as dj4uk said are stored locally on the users machine. This cookie only holds the sessionid which is passed to the webserver which has all the real values that have been saved. And as dj4uk said this has changed in .Net where nothing is saved on the local machine when sessions are used.
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width