Session alternative.

Results 1 to 2 of 2

Thread: Session alternative.

  1. #1
    Join Date
    Dec 1969

    Default Session alternative.

    For a website where you need to be logged in to view most of it&#039;s content an easy way to determine whether the user is logged in or not is to use a Session Variable. Not a hip, just one boolean Session("IsLoggedIn"). Now to my question, what&#039;s the disadvantages of this method? Are there any good alternatives?<BR>And if there are, is it worth the extra work to avoid using this one session variable?

  2. #2
    Join Date
    Dec 1969

    Default RE: Session alternative.

    Unless the site gets shed loads of traffic, stick with the session vars. They are not as bad as has been claimed.<BR><BR>Yes, they do use up memory, but 1 session var per user is not going to make your machine grind to a halt.<BR><BR>If you do want alternatives, you could use:<BR>Hidden fields : not secure (view/source would expose them) and you need to keep posting them between your pages.<BR>Cookies : but make sure they expire.<BR>Querystring : visible in the url & you need to pass them to all pages.

Posting Permissions

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