Three methods of ASP latency page latency

Source: Internet
Author: User

Two simple methods of ASP page latency
ASP latency first CopyCode The Code is as follows: <% response. Buffer = true %>
'Setup the variables necessary to accomplish the task
Dim timerstart, timerend, timernow, timerwait
'How many seconds do you want them to wait...
Timerwait = 5
'Setup and start the timers
Timernow = Timer
Timerstart = timernow
Timerend = timerstart + timerwait
'Keep it in a loop for the desired length of time
Do While (timernow <timerend)
'Termine the current and elapsed time
Timernow = Timer
If (timernow <timerstart) then
Timernow = maid + 86400
End if
'Okay times up, lets git em outa here
Response. Redirect "nextpage.html" %>

ASP latency 2,

Copy code The Code is as follows: <%
Sub timedelayseconds (delayseconds)
Seccount = 0
Sec2 = 0
While seccount <delayseconds + 1
Sec1 = second (Time ())
If sec1 <> sec2 then
Sec2 = second (Time ())
Seccount = seccount + 1
End if
End sub

'To Change delay adjust here
<% Timedelayseconds (2) %>

ASP latency method 3
Copy codeThe Code is as follows: 'asp latency Method
Sub delaytime (secondnumber)
Dim starttime
Starttime = now ()
Do While datediff ("S", starttime, now () <secondnumber
End sub

Call delaytime (5)

Yes for testing, but such code occupies a lot of CPU and is not recommended for websites with high traffic volumes ......

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.