Live data from Hacker News

Headless mode in Firefox

developer.mozilla.org

31–40 of 191 posts

Re: Headless mode in Firefox

#31
Does anyone have any metrics on headless vs headed browser testing? Can you say headless is 25% faster and 20% more reliable? What is the sales pitch for headless browsers for UI automation?

Re: Headless mode in Firefox

#32
post #23

Earlier quoted context omitted.

No it isn't, the URL is unreliable source of truth with Unicode spoofing attacks and things like that. Safari only shows the domain at this point; the URL is an unimportant implementation detail.

It would be cool if browsers could highlight URLs that contain the kind of characters which are commonly used to spoof, though I suppose it would lead people to a false sense of security.

Firefox [0] and Chrome [1] have policies for when to show Unicode and when to show raw punycode. You can also set flags to force them to show punycode all the time.

[0] https://wiki.mozilla.org/IDN_Display_Algorithm#Algorithm

[1] https://www.chromium.org/developers/design-documents/idn-in-...

Re: Headless mode in Firefox

#33
post #21

With Chrome and Firefox finally adding a headless mode, could I replace Lynx for Chrome or Firefox?

No, that's two different concerns.

Headless Chrome/Firefox render the website into a framebuffer in memory (instead of on the screen), but websites still look the same. You can extract an image file from this framebuffer and it will look as if the browser had been running in normal GUI mode.

Lynx on the other hand renders onto a text terminal, which is a completely different output device compared to a pixel-based framebuffer.

Re: Headless mode in Firefox

#34
post #6

Can you tell Firefox to print in headless mode? I want to write reports using HTML and JS, but printing is always an issue.

Remember that if you pass through any data from an outside source, you're running their code on your browser when you thought you were just printing a document.

The security issues don't apply in all circumstances, of course, but if you feel like taking a shortcut to PDF generation and printing through a headless browser, you need to keep them in mind.

Re: Headless mode in Firefox

#35
post #17
post #6

Can you tell Firefox to print in headless mode? I want to write reports using HTML and JS, but printing is always an issue.

You can generate pdfs with headless Chromium/Chrome pretty easily[1]. chromium-browser --headless --disable-gpu --print-to-pdf=output_file_name.pdf file:///path/to/your/html [1] https://developers.google.com/web/updates/2017/04/headless-c...

Wow - thanks for posting that: could come in handy on the project I'm currently working on!

Re: Headless mode in Firefox

#36
post #31

Does anyone have any metrics on headless vs headed browser testing? Can you say headless is 25% faster and 20% more reliable? What is the sales pitch for headless browsers for UI automation?

Don't know about performance numbers, but one reason for headless browsers is so that you can run your tests on cheap small headless Linux servers.

Re: Headless mode in Firefox

#37

For all of you old fogies working on angular 1 apps and are running browser tests with karma you can run your tests in firefox with headless mode with a customer launcher. Add the snippet below to your karma conf ``` browsers: ['FirefoxHeadless'], customLaunchers: { FirefoxHeadless: { base: 'Firefox', flags: [ '-headless', ], }, }, ``` Note you need to be running the beta version of firefox, I needed to download it f…

Does this offer any real benefit over Xvfb?

Re: Headless mode in Firefox

#38

For all of you old fogies working on angular 1 apps and are running browser tests with karma you can run your tests in firefox with headless mode with a customer launcher. Add the snippet below to your karma conf ``` browsers: ['FirefoxHeadless'], customLaunchers: { FirefoxHeadless: { base: 'Firefox', flags: [ '-headless', ], }, }, ``` Note you need to be running the beta version of firefox, I needed to download it f…

Do you have any advice on how to get off of Karma with Angular 1 apps?

Re: Headless mode in Firefox

#39
post #36
post #31

Does anyone have any metrics on headless vs headed browser testing? Can you say headless is 25% faster and 20% more reliable? What is the sales pitch for headless browsers for UI automation?

Don't know about performance numbers, but one reason for headless browsers is so that you can run your tests on cheap small headless Linux servers.

Adding to ^. You don't need to have the Xorg stuff running to run tests.

Re: Headless mode in Firefox

#40
post #3

As a UI designer, I dream of strike headless strike chromeless browsers, where the UI appears when you need it, intuitively, even when NOT in full screen. The top bar simply takes too much unnecessary space. If there's any dev that wants to collaborate on this, let me know :)

I really hate this trend in UI design. I have to scroll back half way up the page in iOS Safari to get the menu bar to display again, for example. I've watched a lot of non-technical users struggle to figure out what magic they have to perform to get an app's controls to even appear.

Your job is to make things usable & functional, not pretty.

Post reply on HN