According to this issue you can call request.abort()
inside page.onResourceRequested
. The example given there, to stop all css being loaded, is:
page.onResourceRequested = function(requestData, request) {
if ((/http:\/\/.+?.css/gi).test(requestData['url']) || requestData['Content-Type'] == 'text/css') {
console.log('The url of the request is matching. Aborting: ' + requestData['url']);
request.abort();
}
}