Write a little bit larger the ASP's people know that the session this object is really useful, it can be used to record the user's private data variables, both safe and convenient. But do you really know how the session works? Maybe after you know it, you'll never be too brave to use this loving and hateful object. While the alternative is a bit cumbersome, it has to be done in the long run.
First of all, the benefit of the session is that it can be used to record the client's private data variables and not disappear within the time range. This is really an important feature, especially if a member's system has to be used. Like a member's login account, time, status, and a lot of real time data for the record ﹝ such as the ﹞ of merchandise in the user's shopping basket for the shopping system, this information is required by individual users, and usually the developer uses session records.
However, the session in ASP is made up of cookies, and the server passes all the information recorded in the session to the user's browser in the form of cookies. Usually the browser will save these cookies, whenever the user click on the link, and again with the server online, the browser will send the cookies back to the server for processing. This is the operating principle of the session, when the data volume is larger, because must be spread out and collected back, not only eat line bandwidth, efficiency is relatively low, because the Server must spend more resources to do online processing and reconfiguration of memory, such as initial action. Now you may think, "I have to use this function, I have to sacrifice the point," but this article on the one hand is to teach people to use less, on the other hand, there is an alternative, and then play, is the same Global.asa Application object.
Application is also a good record of processing temporary data, all aspects of the ability and usage are the same as the session, but in contrast, it records the information is public, that is, any user can share the variable space. Application not like session, not the data to the user, and so the next time read back online, it is directly recorded in the Server memory, relative to the efficiency of the session many.