Jump to content

Recommended Posts

Posted

Can anyone please give me the code to display in a message box the time taken to load a page in IE.

Thanks

You might want to learn how to search the help file.

In this case, I searched for time and wait:

#include <IE.au3>

$begin = TimerInit()
$oIE = _IECreate("http://www.cnn.com")
_IELoadWait($oIE)
$dif = TimerDiff($begin)
MsgBox(0, "Time Difference", $dif)

[size="1"][font="Arial"].[u].[/u][/font][/size]

Posted

Thanks a lot dear ..... Also your suggestion for searching helpfile is correct..... I tried to search but couldnt find it......thanks again

Posted

Having walked you thru all of that, you might find it better to use InetGet and set the reload parm to "1 = Forces a reload from the remote site" to avoid IE temp file cache issues.

Also note that it takes time for a computer and browser to render (paint/show) the page you requested - meaning, if you use the _IECreate/_IENavigate method mentioned in my previous posts on slow hardware, you will see a difference in the "load time". The difference will be relative, so you might still find it of some use, but InetGet should be less influenced by hardware.

That "time to render" is part of this site's speed test:

http://www.numion.com/YourSpeed3/Select.php

See the brief explanation of MaxSpeed and SurfSpeed near the bottom of that page.

[size="1"][font="Arial"].[u].[/u][/font][/size]

Posted

Thanks a lot

You are welcome... but if you run this code, you might see that a lot of the variation is not the fault of the proxy.
TrayTip("", "working", 100)

$begin = TimerInit()
InetGet("http://infospeed.verizon.net/car/data5MB.zip", "tempfile", 1)
$dif1 = TimerDiff($begin)
TrayTip("", "time1  " & Int($dif1), 100)

$begin = TimerInit()
InetGet("http://infospeed.verizon.net/car/data5MB.zip", "tempfile", 1)
$dif2 = TimerDiff($begin)
TrayTip("", "time1  " & Int($dif1) & @CR & _
        "time2  " & Int($dif2), 100)

$begin = TimerInit()
InetGet("http://infospeed.verizon.net/car/data5MB.zip", "tempfile", 1)
$dif3 = TimerDiff($begin)
TrayTip("", "time1  " & Int($dif1) & @CR & _
        "time2  " & Int($dif2) & @CR & _
        "time3  " & Int($dif3), 100)

FileDelete("tempfile")

Sleep(22222)

[size="1"][font="Arial"].[u].[/u][/font][/size]

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...