Quote:
Originally Posted by Heinz
Is there any timeout possible for the getPage request?
Like if the page is not loaded after 10sec it should skip the request.
Code:
browser.setConnectTimeout(10000);
browser.setReadTimeout(10000);
Dont seem to help..
Code:
var browser = getBrowser();
try {
browser.getPage("http://www.google.de/", 10000);
} catch (e) {
}
How could this be achieved? possible in any way?
|
myBrowser.setConnectTimeout(myInt);
myBrowser.setReadTimeout(myInt);
which you have mentioned
timeout value within getpage is not supported.
but try and catch should work.
..
in respects to mpgai response the method myBrowser.getRequestTime might be a better solution.
Keep in mind Javascript support in JD can contain commands that are wrapped back into JD methods, the Javascript interface is sandboxed.
Timeouts have always been an issue specially to laggy connections within JD Browser. The interface between sockets and GUI has been a problem as it waits for all connections to close before coming responsive again. Large timeout timeframes are not recommended from personal experience, it just makes situation worse. If a connection can't be used in standard times, you're better off not using it.