Headless browser

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 they 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.[1]

Since version 59 of Google Chrome[2][3] and version 56[4] of Firefox,[5] there is native support for remote control of the browser. This made earlier efforts obsolete, notably PhantomJS.[6]

  1. ^ "What is a headless browser?". arhg.net. 7 October 2009.
  2. ^ "Getting Started with Headless Chrome". developers.google.com. 27 April 2017.
  3. ^ Cite error: The named reference :0 was invoked but never defined (see the help page).
  4. ^ "Firefox 56 release notes". developer.mozilla.org. 26 February 2023.
  5. ^ "Headless mode - browser support". developer.mozilla.org. Archived from the original on 2018-06-03. Retrieved 2017-08-31.
  6. ^ "Quick Start". phantomjs.org.