View Single Post
  #1282  
Old 21.03.2020, 17:18
Heinz Heinz is offline
JD Alpha
 
Join Date: Feb 2020
Posts: 21
Default

Quote:
Originally Posted by mgpai View Post
Connect/read timeout appears to be working fine. Had you tried this way?
...
Thanks for the reply!

If i set timeout to 10 i also get a null return. But the general timeout is not working as expected.

If i measure the loadTime it can get higher than the timeout.

e.g. loadTime = 156ms when timeout was set to 50.
If a proxy is enabled loadTime can get really high.
So the timeout is not working unfortunately.


Code:
    
    var br = getBrowser();
    br.setConnectTimeout(50);
    br.setReadTimeout(50);
    //br.setProxy(...);
    var page = null;

    try {
        var startTime = new Date();
        page = br.getPage("http://www.google.de/");
        var endTime = new Date();
        var loadTime = endTime - startTime;
    } catch (e) {}

    alert(loadTime + " " + page);
Is this a bug? Do you know anything elese i could try?
Reply With Quote