Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Dec 2004
    Location
    Jamaica
    Posts
    592
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Netscape Session.abandon vs session.contents.removeall

    As my title suggests whats the difference between Session.abandon and session.contents.removeall

    And does session.abandon do what session.contents.removeall would do?

    And do i have to like use them in a particular order... because i am guessing that i would have to use say the session abandon method last because after that the session.sessionID variable would be reset or something?

    Holler?

  • #2
    Senior Coder
    Join Date
    Apr 2003
    Location
    England
    Posts
    1,192
    Thanks
    5
    Thanked 13 Times in 13 Posts
    im not 100% sure on this but i think Session.Abandon deletes the sessions for that user and Session.Contents.RemoveAll just sets them all to ""

    i think the difference is explained on www.w3chools.com somewhere

  • #3
    Regular Coder
    Join Date
    Oct 2004
    Location
    In front of this computer. (Where else?)
    Posts
    442
    Thanks
    0
    Thanked 0 Times in 0 Posts
    There are two Session collections
    • Contents
    • Staticobjects

    When you use
    Code:
    Session.Contents.Removeall
    It only clears the Contents collection but all static objects remain in use and the session still stays active. Also the Codepage, LCID and SessionID remains in use.

    When you use
    Code:
    Session.Abandon
    You're removing everything about the session. Then and only then will the Session_OnEnd event be triggered.
    Related Link:http://www.w3schools.com/asp/asp_ref_session.asp

    Hope this helped
    Tomorrow is the first day of the rest of your life... What have you done today?
    Tutorials
    Web: w3schools, htmldog General tips: Hardware, Networking

  • #4
    Regular Coder
    Join Date
    Dec 2004
    Location
    Jamaica
    Posts
    592
    Thanks
    2
    Thanked 0 Times in 0 Posts
    ok.... thnx

    i think i've obtained a full understading

    session.contents.remove or removeall removes a particular or All session variables resepctively.... keepin the id

    However session.abandon simply destroys all variables and resets the session with a new id

    and to use both of them would to b redundant in a sense

    thanks guys!


  •  

    Posting Permissions

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