C
C
cyberlog2016-11-07 19:15:54
PhantomJS
cyberlog, 2016-11-07 19:15:54

PhantomJS - how to disable the download of unnecessary files (scripts, pictures)?

Before injecting your own script, you need to disable third-party heavy scripts, how to do it right?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Sundukov, 2016-11-12
@alekciy

You will not be able to disable JavaScript on the page and still work normally with the page from JS. But if you really want to disable JS (and pictures are also possible), then it is set by the WebPage module settings: phantomjs.org/api/webpage/property/settings.html
If the work goes through WebDriver, then it is disabled through javascript.enabled=false. The implementation depends on the chosen language.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question