Live data from Hacker News

Firefox 56 supports headless mode on Windows

bugzilla.mozilla.org

21–30 of 88 posts

Re: Firefox 56 supports headless mode on Windows

#21
post #6

Is there a linux headless mode already? Selenium chrome driver headless is pretty much useless in linux because important methods like `send_keys` need X anyway for keyboard mappings or something like that.

Genuine noob question: could you not use Xvfb?

Re: Firefox 56 supports headless mode on Windows

#23

So I can navigate by cardinal directions now (like scrolling south a bit)? Joke aside: can somone explain "headless" to me here?

A headless browser is a web browser without a GUI. Extremely useful in web testing/scrapping.

Blog / forum "SEO" spam bots will also be a big use case.

Re: Firefox 56 supports headless mode on Windows

#24
post #12

I was wondering if I could use this (using a plugin) or Chrome to generate PDF files on the web server. Most of the PDF generation software out there are quite expensive.

You can. In my experience, there are very few systems as good at producing accurate renders as well as Chrome. There are a few Chrome/webkit based options.

PhantomJS made the process pretty easy, but that's probably not a good option these days as it's on the way out.

NightmareJS is pretty much the same and can do it (though I haven't tested myself) [0]

If you want to get a little deeper you can use CEF (Chromium Embedded Framework [1 ]. It basically turns Chrome into a library and there are a bunch of projects that build on top of it (eg Electron, which is what NightmareJS uses underneath).

Here's a project that just uses CEF for converting to PDF [2].

[0] https://github.com/segmentio/nightmare#pdfpath-options [1] https://bitbucket.org/chromiumembedded/cef/overview [2] https://github.com/spajak/cef-pdf

Re: Firefox 56 supports headless mode on Windows

#25
post #22

"headless" Poke me when there are no X11/Qt/GTK/whatever dependencies at all - that is headless. https://packages.debian.org/stretch/firefox-esr

This got down voted a lot but GTK is really a pretty painful dependency in many situations (especially gtk3)

Not that Firefox itself is particularly lightweight.

Re: Firefox 56 supports headless mode on Windows

#26
post #25
post #22

"headless" Poke me when there are no X11/Qt/GTK/whatever dependencies at all - that is headless. https://packages.debian.org/stretch/firefox-esr

This got down voted a lot but GTK is really a pretty painful dependency in many situations (especially gtk3) Not that Firefox itself is particularly lightweight.

Why?

Re: Firefox 56 supports headless mode on Windows

#27
post #6

Is there a linux headless mode already? Selenium chrome driver headless is pretty much useless in linux because important methods like `send_keys` need X anyway for keyboard mappings or something like that.

Genuine noob question: could you not use Xvfb?

The whole point of headless, from what I can tell, is that you don't _have_ to!

Re: Firefox 56 supports headless mode on Windows

#28
post #22

"headless" Poke me when there are no X11/Qt/GTK/whatever dependencies at all - that is headless. https://packages.debian.org/stretch/firefox-esr

If your running this on a server sure great. On desktop that is next to pointless due to the need for those dependencies for everything besides cure apps.

Re: Firefox 56 supports headless mode on Windows

#29
post #11
post #6

Is there a linux headless mode already? Selenium chrome driver headless is pretty much useless in linux because important methods like `send_keys` need X anyway for keyboard mappings or something like that.

There is a bug filed against the chrome driver send_keys issue, and a workaround...one that requires recompiling though. https://bugs.chromium.org/p/chromedriver/issues/detail?id=17...

recompiling does solve the issue though

If you are blocked it may be worth a look

Re: Firefox 56 supports headless mode on Windows

#30
post #22

"headless" Poke me when there are no X11/Qt/GTK/whatever dependencies at all - that is headless. https://packages.debian.org/stretch/firefox-esr

I think the goal is to have a browser that renders web pages and is fully interactive, but just doesn't render to screen and is interactive through an API rather than input devices.

So it's going to need a UI rendering and interaction library.

Post reply on HN