3 ms·
You can use one of the many headless browsers available. Selenium, phantomjs, phantomjs+casper, webkit, chromium, awesomium, name your poison. All are quite com
by elorant 11y ago
You can use one of the many headless browsers available. Selenium, phantomjs, phantomjs+casper, webkit, chromium, awesomium, name your poison. All are quite competent in rendering modern web pages. You don’t need to reinvent the wheel.
- logn 11y agoAlso, if you want a headless browser that uses solely a JRE, my project is https://github.com/machinepublishers/jbrowserdriver https://github.com/machinepublishers/jbrowserdriver
- AnbeSivam 11y agoAny idea how good java's nashorn is for this.
- logn 11y agoNashorn isn't actually used in Java's WebView (which my project leverages). Nashorn is used elsewhere in the JRE and replaces Rhino from prior releases, but WebView has used something else entirely: JavaScriptCore. Details: http://stackoverflow.com/questions/30104124/what-javascript-engine-used-inside-javafx/30110389#30110389 http://stackoverflow.com/questions/30104124/what-javascript-... But essentially on performance, it's comparable to a desktop browser but still slower than I'd like. Java 9 should support HTTP 2 and async HTTP by default, which might help. And I've been looking into short-cutting some of the in-memory rendering but haven't had any breakthroughs yet. As far as JavaScriptCore engine specifically, it's the default in WebKit so there should be good performance data out there on it.
- AnbeSivam 11y agoThanks
- deleted 11y ago[deleted]