Headless mode in Firefox
61–70 of 191 posts
Re: Headless mode in Firefox
#62For 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
#63Earlier quoted context omitted.
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!
It works very well, but there are some gotchas with regard to the Chrome Remoting Interface.
Re: Headless mode in Firefox
#64Can you tell Firefox to print in headless mode? I want to write reports using HTML and JS, but printing is always an issue.
Re: Headless mode in Firefox
#65Earlier quoted context omitted.
From a security POV, the URL being displayed at all times is absolutely necessary in order to avoid phishing.
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.
From: "https://mail.google.com"
If they looked the same.
Re: Headless mode in Firefox
#66Re: Headless mode in Firefox
#67Can 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.
I used this approach for a project at a previous company and not only did it keep the potentially unsafe external code execution isolated from the rest of the stack, but it also proved to be fantastically scalable because of the ability to have AWS Lambda running many headless browsers in parallel compared to trying to scale something like this out on your own hardware.
Re: Headless mode in Firefox
#68Re: Headless mode in Firefox
#69It would be cool if mozilla and google would standatalize the headless API and command line flags as llvm and gcc has done, so you would perform headless cross browser testing.
Which is not to say there is not common effort between the projects you mention now.