The main use cases for headless browsers are:
Headless browsers are also useful for web scraping. Google stated in 2009 that using a headless browser could help their search engine index content from websites that use Ajax.7
Headless browsers have also been misused in various ways:
However, a study of browser traffic in 2018 found no preference by malicious actors for headless browsers.12 There is no indication that headless browsers are used more frequently than non-headless browsers for malicious purposes, like DDoS attacks, SQL injections or cross-site scripting attacks.
As several major browsers natively support headless mode through APIs, some software exists to perform browser automation through a unified interface. These include:
Some test automation software and frameworks include headless browsers as part of their testing apparati.16
Another approach is to use software that provides browser APIs. For example, Deno provides browser APIs as part of its design. For Node.js, jsdom19 is the most complete provider. While most are able to support common browser features (HTML parsing, cookies, XHR, some JavaScript, etc.), they do not render the DOM and have limited support for DOM events. They usually perform faster than full browsers, but are unable to correctly interpret many popular websites.202122
Another is HtmlUnit, a headless browser written in Java. HtmlUnit uses the Rhino engine to provide JavaScript and Ajax support as well as partial rendering capability.2324
These are various software that provide headless browser APIs.
Another noted earlier effort was envjs in 2008 from John Resig, which was a simulated browser environment written in JavaScript for the Rhino engine.31
"What is a headless browser?". arhg.net. 7 October 2009. http://blog.arhg.net/2009/10/what-is-headless-browser.html ↩
"Getting Started with Headless Chrome". developers.google.com. 27 April 2017. https://developers.google.com/web/updates/2017/04/headless-chrome ↩
Bekerman, Dima (2018-11-28). "Headless Chrome: DevOps Love It, So Do Hackers, Here's Why | Imperva". Blog. Retrieved 2021-02-22. https://www.imperva.com/blog/headless-chrome-devops-love-it-so-do-hackers-heres-why/ ↩
"Firefox 56 release notes". developer.mozilla.org. 26 February 2023. https://developer.mozilla.org/en-US/Firefox/Releases/56#Other ↩
"Headless mode - browser support". developer.mozilla.org. Archived from the original on 2018-06-03. Retrieved 2017-08-31. https://web.archive.org/web/20180603191617/https://developer.mozilla.org/en-US/Firefox/Headless_mode#Browser_support ↩
"Quick Start". phantomjs.org. http://phantomjs.org/quick-start.html ↩
Mueller, John (2009-10-07). "Official Google Webmaster Central Blog: A proposal for making AJAX crawlable". Official Google Webmaster Central Blog. http://googlewebmastercentral.blogspot.com.au/2009/10/proposal-for-making-ajax-crawlable.html ↩
Rawlings, Matt (2013-11-20). "Headless Browser Botnet Used in 150 hour DDoS attack". Business 2 Community. http://www.business2community.com/tech-gadgets/headless-browser-botnet-used-150-hour-ddos-attack-0688767 ↩
Mello Jr., John P. (2014-03-25). "Headless Web Traffic Threatens Internet Economy". ecommercetimes.com. http://www.ecommercetimes.com/story/80194.html ↩
Raywood, Dan (2014-04-01). "Headless browsers: legitimate software that enables attack". ITProPortal. http://www.itproportal.com/2014/04/01/headless-browsers-legitimate-software-enables-attack/ ↩
Mueller, Neal. "Credential stuffing". owasp.org. https://www.owasp.org/index.php/Credential_stuffing ↩
Sheth, Himanshu (2020-11-17). "Selenium 4 Is Now W3C Compliant: All You Need To Know". https://www.lambdatest.com/blog/selenium4-w3c-webdriver-protocol/ ↩
"GitHub - Playwright". GitHub. Retrieved 2021-04-11. https://github.com/microsoft/playwright ↩
"Github - Puppeteer". GitHub. Retrieved 2021-04-11. https://github.com/puppeteer/puppeteer ↩
Silva, Francisco (2019-05-29). "From capybara-webkit to Headless Chrome and ChromeDriver". Blog | Imaginary Cloud. Retrieved 2021-02-22. https://www.imaginarycloud.com/blog/from-capybara-webkit-to-headless-chrome-and-chromedriver/ ↩
Bintz, John. "jasmine-headless-webkit -- The fastest way to run your Jasmine specs!". johnbintz.github.io. Retrieved 2021-02-22. https://johnbintz.github.io/jasmine-headless-webkit/ ↩
"JSDOM at GitHub - Pretending to be a visual browser". GitHub. Retrieved 2021-04-18. https://github.com/jsdom/jsdom#pretending-to-be-a-visual-browser ↩
"assaf/zombie". GitHub. https://github.com/assaf/zombie/tree/v3.0.15#faq ↩
"ヘルペスが口や目からうつる?感染した時の症状と病院の治療方法とは". www.envjs.com. Archived from the original on 2015-02-23. Retrieved 2015-03-13. https://web.archive.org/web/20150223094542/http://www.envjs.com/doc/guides ↩
"JavaScriptMVC - EnvJS". javascriptmvc.com. Archived from the original on 2015-05-23. Retrieved 2015-03-13. https://web.archive.org/web/20150523003635/http://www.javascriptmvc.com/docs/funcunit.envjs.html ↩
Mike Bowler. "HtmlUnit – Welcome to HtmlUnit". sourceforge.net. http://htmlunit.sourceforge.net/ ↩
"Platform (Vaadin 7.3.4 API)". vaadin.com. 6 November 2014. http://vaadin.com/download/release/7.3/7.3.4/docs/api/com/google/gwt/junit/Platform.html ↩
"scrapinghub/splash". GitHub. 20 December 2021. https://github.com/scrapinghub/splash ↩
"DARPA - Open Catalog". Archived from the original on 2015-05-28. Retrieved 2015-05-28. https://web.archive.org/web/20150528223527/http://www.darpa.mil/opencatalog/MEMEX.html ↩
"Zombie". labnotes.org. http://zombie.labnotes.org/ ↩
SimpleBrowserDotNet/SimpleBrowser, SimpleBrowserDotNet, 2021-02-10, retrieved 2021-02-22 https://github.com/SimpleBrowserDotNet/SimpleBrowser ↩
DotNetBrowser Examples, TeamDev, 2021-03-12, retrieved 2021-03-12 https://github.com/TeamDev-IP/DotNetBrowser-Examples ↩
"DotNetBrowser". TeamDev. 2021-05-05. https://www.teamdev.com/dotnetbrowser ↩
Resig, John (2008-10-12). "env-js: A pure-JavaScript browser environment" – via GitHub. https://github.com/jeresig/env-js ↩