Live data from Hacker News

Chrome 59 has cross-platform headless support

chromestatus.com

131–140 of 161 posts

Re: Chrome 59 has cross-platform headless support

#132
post #121

Related: I want to take screenshots of a few news websites for a little fake news project of mine, and most approaches return something completely different than what I'm seeing when I open Chrome. Limited height would be better/ok (something like the first 3000 pixels). Low volume / can be slow (30 seconds would be ok). Those news websites many times have infinite scrolling. I've tried: - phantomJS (rendering sucked…

I use xvfb for selenium testing. It is really easy to set up and can take screenshots or videos while automatically browsing websites.

Thanks - I tried Selenium (on the desktop) with geckodriver now and it rendered well. The only thing is that long screenshots didn't work but there is probably a workaround for that.

Re: Chrome 59 has cross-platform headless support

#133
post #92
post #68

I've been testing Chrome headless extensively for the past few months, and while it's a good step, but it's not stable for high-volume or even diverse set of webpages. Memory usage is pretty high, lot of heavy webpages result in crashes/hangs, there are many inconsistencies between features available in full version and headless, their debugging protocol has different APIs that work on headless/non-headless in Linux…

I've been successfully using Chrome headless in a 500MB Docker container for dumping the DOM for https://www.prerender.cloud/ for months (rendering a large variety of sites without restarts for weeks at a time) Run it with: --js-flags="--max_old_space_size=500" to force the VM to keep it GC'd below 500 Chrome v55 was a 30% memory savings, before that I used 1GB containers. It's not perfect, but I am definitely pushin…

what Docker image are you using?

Re: Chrome 59 has cross-platform headless support

#134
post #79

Earlier quoted context omitted.

Has it actually landed in the builds yet, or just been marked as targeting 59 in the platform docs?

We are targeting 59. A fix for Mac OS X is on its way: https://codereview.chromium.org/2811633002

Thanks! It looks like that has been closed... is there any way to know what release # the fix is in, or when it gets released?

Re: Chrome 59 has cross-platform headless support

#137

Earlier quoted context omitted.

That ought actually be: --js-flags="--max-old-space-size=500" Hyphens not underscores. A list of V8 flags can be found with: --js-flags="--help"

I think it may accept both the underscore and hyphen and just normalizes it.

[deleted]

Re: Chrome 59 has cross-platform headless support

#138

Earlier quoted context omitted.

That ought actually be: --js-flags="--max-old-space-size=500" Hyphens not underscores. A list of V8 flags can be found with: --js-flags="--help"

I think it may accept both the underscore and hyphen and just normalizes it.

This is correct, it does accept both, and the help lists it as underscores not hyphens. So the comment about it ought to be hyphens not underscores is incorrect. Either is fine.

Re: Chrome 59 has cross-platform headless support

#140

Earlier quoted context omitted.

Also with https://wkhtmltopdf.org/ and http://pandoc.org/

And, if you need much higher fidelity and control of HTML/CSS -> PDF, there's the fantastic Prince library, http://princexml.com/ (nonfree) (I've been using Prince for over a decade, rendering everything from prescription labels, packing slips, receipts, resumes, books, and more. It's great.)

That's also an API service, http://docraptor.com, with a different pricing model that uses the Prince library for PDF rendering.
Post reply on HN