ASP Speed!

By default, ASP applications make use of the Session object to maintain state. This will place a cookie on the user's computer. However, many sites have many pages where maintaining state isn't really important. In these cases, you can add this directive to the top of the page:

<% ENABLESESSIONSTATE = False %>

You should place this script as the first line in your .asp file, before any other scripts.

Here's some additional information from MSDN:

"Sessionless ASP pages can often improve the responsiveness of your server by eliminating potentially time-consuming session activity. For example, consider the case of an ASP page containing two HTML frames: frames 1 and 2, both within one frameset. Frame 1 contains an .asp file that executes a complex script, while frame 2 contains a simple .html file. Because ASP executes session requests in sequential order, or serially, you will not be able to see the contents of frame 2 until the script in frame 1 has executed. However, if you make the .asp file for frame 1 sessionless, then ASP requests will no longer be serialized and the browser will render the contents of frame 2 before the contents of frame 1 have finished executing.

"Unfortunately, the way in which multiple requests for different frames are processed ultimately depends on the configuration of the user's Web browser. Certain Web browsers may serialize requests despite the sessionless configuration of your .asp files."

ASP Speed! Part2

Description: Normally ASP pages are considered active content. That's sort of the whole point of the name Active Server Pages. There are times, however, when you want to use ASP to generate a page who's content doesn't change very often. It's this type of situation when caching can really boost the perceived speed of your site. By default most proxy servers won't cache dynamic content including your ASP pages. If you have a script in which the information rarely changes, try placing the following line at the top of your ASP script. It'll really help boost your site's apparent speed for users who visit your site from behind a proxy.

<%
Response.CacheControl = "Public"
%>




Back To Top
© 1998 - 2024 psacake.com
Version 7.21 | Advertise on this site