TwitterFacebookInstagramYouTubeDEV CommunityGitHub
Headless Chrome - What is it?

Headless Chrome - What is it?

What is Headless Chrome?

Headless Chrome is a headless browser. Great answer! But what is a headless browser? 😉

What is a headless browser?

A headless browser is a browser without a graphical user interface (GUI). Instead of controlling the browser's actions via its GUI, headless browsers are controlled programmatically using the command line interface (CLI).
In essence, a headless browser is a type of software that can access webpages without presenting it the actual web page graphically to the user and can pipe content of the webpages to another program. Unlike a normal browser, nothing will appear on the screen when you start up a headless browser since the programs run in the backend.
But why would one want to control the browser without the GUI?

Why do we need headless browser?

A headless browser is a great tool for automated testing and server environments where you don't need a visible UI shell. Some examples are listed below:

  • Search engines use headless browser to render pages, generate dynamic content, and index data from Single Page Application (SPA).
  • SEO tools use headless browser to analyze websites and make suggestions on how to improve it.
  • Monitoring tools use headless browser to monitor JavaScript execution time in web apps for performance diagnosis
  • Headless browsers can be used to generate PDFs of web pages on the backend server.
  • Headless browsers provide automated testing of web applications.

What are the common types of headless browsers beside Headless Chrome?

  • Firefox headless mode
  • PhantomJS
  • Zombie.js
  • HtmlUnit
  • Splash
  • Electron
  • NightmareJS