Reputation: 11585
Is there a way to just load the server generated HTML (without any js or images)?
The docs seem a little sparse
Upvotes: 1
Views: 78
Reputation: 16838
The strength of PhantomJS is exactly in its ability to emulate a real browser, which opens a page and makes all the subsequent request. If you want just html maybe better use curl or wget?
But nevertheless there is a way not to run js or load images: set corresponding page settings: http://phantomjs.org/api/webpage/property/settings.html
page.settings.javascriptEnabled = false;
page.settings.loadImages = false;
Upvotes: 1