Headless browser (nonfiction): Difference between revisions

From Gnomon Chronicles
Jump to navigation Jump to search
No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 10: Line 10:
* Taking screenshots of web pages.
* Taking screenshots of web pages.
* Running automated tests for JavaScript libraries.
* Running automated tests for JavaScript libraries.
* Scraping web sites for data.
* [[Web scraping (nonfiction)|Scraping web sites]] for data.
* Automating interaction of web pages.
* Automating interaction of web pages.


Line 17: Line 17:
Malicious uses include:
Malicious uses include:


* Perform DDOS attacks on web sites.
* Perform [[Denial-of-service attack (nonfiction)|denial-of-service attacks]] on web sites.
* Increase advertisement impressions.
* Increase advertisement impressions.
* Automate web sites in unintended ways e.g. for credential stuffing.
* Automate web sites in unintended ways e.g. for credential stuffing.
Line 23: Line 23:
List of browsers providing a complete or near-complete headless implementation:
List of browsers providing a complete or near-complete headless implementation:


* Google Chrome – since version 59 Chrome supports headless mode in Linux and macOS
* Google Chrome – since version 59 Chrome supports headless mode in Linux and [[macOS (nonfiction)|macOS]]
* Firefox – headless mode is available on linux since version 55. Version 56 added support for headless mode in Windows and macOS
* Firefox – headless mode is available on linux since version 55. Version 56 added support for headless mode in Windows and macOS
* [[PhantomJS (nonfiction)|PhantomJS]] – a headless web browser using WebKit layout engine for rendering web pages and JavaScriptCore for executing scripted tests. PhantomJS was originally developed by Ariya Hidayat in 2010 and has gained a wide following and extensive development ecosystem.
* [[PhantomJS (nonfiction)|PhantomJS]] – a headless web browser using WebKit layout engine for rendering web pages and JavaScriptCore for executing scripted tests. PhantomJS was originally developed by Ariya Hidayat in 2010 and has gained a wide following and extensive development ecosystem.
Line 34: Line 34:


<gallery>
<gallery>
File:PhantomJS.png|link=PhantomJS (nonfiction)|"I'm using [[PhantomJS (nonfiction)|PhantomJS]] to make screenshots of the Gnomon Chronicles wiki," says author [[Karl Jones (nonfiction)|Karl Jones]].
File:PhantomJS.png|link=PhantomJS (nonfiction)|"I'm using [[PhantomJS (nonfiction)|PhantomJS]] to make screenshots of this wiki," says author [[Karl Jones (nonfiction)|Karl Jones]].
</gallery>
</gallery>


Line 46: Line 46:
== Nonfiction cross-reference ==
== Nonfiction cross-reference ==


* [[Denial-of-service attack (nonfiction)]]
* [[PhantomJS (nonfiction)]]
* [[PhantomJS (nonfiction)]]
 
* [[Web scraping (nonfiction)]]
External links:
External links:


* [https://en.wikipedia.org/wiki/Headless_browser Headless browser] @ Wikipedia
* [https://en.wikipedia.org/wiki/Headless_browser Headless browser] @ Wikipedia
* [https://developer.mozilla.org/en-US/Firefox/Headless_mode Firefox headless mode] @ Mozilla.org


[[Category:Nonfiction (nonfiction)]]
[[Category:Nonfiction (nonfiction)]]
[[Category:Software (nonfiction)]]
[[Category:Software (nonfiction)]]

Latest revision as of 07:44, 12 September 2019

A headless browser is a web browser without a graphical user interface.

Headless browsers provide automated control of a web page in an environment similar to popular web browsers, but are executed via a command-line interface or using network communication.

They are particularly useful for testing web pages as they are able to render and understand HTML the same way a browser would, including styling elements such as page layout, color, font selection, and execution of JavaScript and AJAX which are usually not available when using other testing methods.

Headless browsers are used for:

  • Test automation in modern web applications.
  • Taking screenshots of web pages.
  • Running automated tests for JavaScript libraries.
  • Scraping web sites for data.
  • Automating interaction of web pages.

Google stated in 2009 that using a headless browser could help their search engine index content from websites that use AJAX.

Malicious uses include:

  • Perform denial-of-service attacks on web sites.
  • Increase advertisement impressions.
  • Automate web sites in unintended ways e.g. for credential stuffing.

List of browsers providing a complete or near-complete headless implementation:

  • Google Chrome – since version 59 Chrome supports headless mode in Linux and macOS
  • Firefox – headless mode is available on linux since version 55. Version 56 added support for headless mode in Windows and macOS
  • PhantomJS – a headless web browser using WebKit layout engine for rendering web pages and JavaScriptCore for executing scripted tests. PhantomJS was originally developed by Ariya Hidayat in 2010 and has gained a wide following and extensive development ecosystem.
  • HtmlUnit – a headless browser written in Java. HtmlUnit uses the Rhino engine to provide JavaScript and AJAX support as well as partial rendering capability.
  • TrifleJS – a headless Internet Explorer scriptable browser using the Trident layout engine for rendering pages and the V8 JavaScript engine for executing scripted tests. TrifleJS uses the same API language as PhantomJS and works by using the .NET WebBrowser object to control whatever version of IE is installed on the machine.
  • Splash – a headless web browser with an HTTP API, Lua scripting support and a built-in IPython (Jupyter)-based IDE. Splash is written in Python and uses WebKit layout engine. Development started at * ScrapingHub in 2013; it is partially funded by DARPA.
  • SimpleBrowser – a lightweight, highly capable, headless web browser with a scriptable .NET Framework API. SimpleBrowser written in C#, supporting .NET Framework 4.0 and Mono. Work is underway to upgrade to .NET Framework 4.5 and .NET Standard 2.0.

In the News

Fiction cross-reference

Nonfiction cross-reference

External links: