Should I use Session Variables???

Results 1 to 2 of 2

Thread: Should I use Session Variables???

  1. #1
    Chetan Sankhla Guest

    Default Should I use Session Variables???

    Hi, <BR>I am developing a web portal that requires user authentication to be done. I am planning to use session variables to store the relevant user entered information. But am apprehensive to use them as their use is supposed to slow down the application&#039s performance.<BR>Is is prudent to use Session variables for storing username and other information?<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Should I use Session Variables???

    in an ideal world, session variables would no oonger be necessary.....<BR><BR>there are times when you have to use them, but generally they should be avoided. Authentication is one of the times when they&#039re most often used, there&#039s not much else you can do in these situations.<BR><BR>here&#039s a pointer though... figure out how many users may be on the server at any particular time. the maximum number of users will be the deciding factor. if you&#039re expecting in the hundreds, definitely don&#039t use session variables. if the server is likely to have less, you can consider it. The only time I use them is to authenticate Adminitration users - there&#039s only going to be one or two on a server at a time (at the most, so you can afford to use them).<BR><BR>you may also like to turn down the session timeout, so that at least dead sessions are cleaned up quickly, allowing more users on for your money.<BR><BR>final pointer - shared hosting can experience session variable problems. other people may not be as careful as you with their session var use. be a good neighbour and keep the use minimal<BR><BR>jason

Posting Permissions

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