phantomJS webpage timeout
PhantomJS 1.9 has introduced a new setting, resourceTimeout, that controls how long a request can take before it gets cancelled. Along with that, there’s a onResourceTimeout event that is triggered if/when a request times out. Here’s a code snippet illustrating all of the above: var page = require(‘webpage’).create(); page.settings.resourceTimeout = 5000; // 5 seconds page.onResourceTimeout … Read more