The Response IsclientConnect attribute can judge whether the server and the polite end are disconnected and returned to True or False when running the ASP. In this way, when users access the pages that occupy more resources, because the user's re -refreshing or closing the page, the server program is still being executed, resulting in the server resources that are not released immediately.
ISClientConnected related instructions
The iSclientConnected attribute is read only. It indicates whether the client is connected to the server after the last calling response.write.
grammar
Program code
Response.isclientConnect ()
Annotation
This attribute allows users to have more control without connecting the client and the server. For example, when the request from the client responds to the server, it is necessary to use it for a long time, which may help to ensure that the client is still connected before continuing to handle the script.
Simple application example:
Program code
<%
'Check to see if the client is connected
If response.isClientConnect then
Response.flush
Else
response.end
End if
%>
Another function is attached:
Program code
<%
Function isconnectafter (seconds)
Dim Starttime
Dim pausetime
Isconnectedafter = TRUE
Starttime = now
Do while datediff (s, starttime, now) <seconds
Pausetime = now
Do while datediff (s, pausetime, now) <1
'Do nothing
Loop
Response.write.
If response.isClientConnect = false then
Isconnectedafter = false
Exit function
End if
Loop
End function
if isconnectedaver (3) then response.write (online)
'Offline will not be displayed^_^
if not isConneCTEDAFTER (3) then response.write (office)
%>