Web browser engine

A web browser engine, also called a layout engine, is a computer program that renders web pages. It is not a stand-alone program but a core component of larger programs, primarily web browsers.

Technical operation

The first web browsers were monolithic programs, but browser developers soon adopted a modular approach, splitting browsers into several large components:

  • The host application embeds the other browser components and serves as the interface between them, the user, and the host operating system. The host application includes the GUI surrounding the web page content, such as the tab bar, the address bar, and bookmark manager.
  • The layout engine does much of the work of rendering a web page. When the user visits a page, the host application provides the layout engine with a URL and content window rectangle coordinates. The layout engine then retrieves the HTML document and associated resources, like style sheets and images, and paints a graphical representation of the page in the given rectangle. The engine also handles links, forms, and related details.
  • Modern browsers typically execute JavaScript with a dedicated engine, e.g. V8 in Google Chrome or SpiderMonkey in Firefox. This is a separate component from the layout engine, but they share a DOM data structure for each rendered web page.

This modular approach has the advantage of allowing layout engines to be embedded in other programs, e.g. an email client that renders HTML email or an EPUB e-book reader. (JavaScript engines have also been embedded in other programs, e.g. V8 in Node.js and SpiderMonkey in GNOME 3.)

Some layout engines may begin rendering before all of a page's resources are received. This can result in visual changes as more data is received, such as images being gradually filled in or a flash of unstyled content if rendering begins before formatting information is received.

Examples

Non-mobile web browser statistics on Wikipedia projects
Google Chrome, Opera and other variants (Blink)
43.00%
Internet Explorer (Trident)
25.80%
Firefox and other variants (Gecko)
18.22%
Safari and other variants (WebKit)
5.90%
Opera (Presto)
2.31%
Others
4.77%
Non-mobile web browser usage for Wikimedia visitors as of February 2014.[1]

Trident is the layout engine of Internet Explorer, also used by Microsoft Outlook and other Windows applications. Microsoft now uses the newer EdgeHTML engine in its Edge browser.

Gecko, the Mozilla project's layout engine, is used by the Firefox browser, the Thunderbird e-mail client, and the SeaMonkey internet suite. Goanna is a fork of Gecko used by the Pale Moon browser.

KDE created the KHTML engine for use in its Konqueror browser. Apple forked KHTML make the WebKit engine for its Safari browser. Google originally used WebKit for its Chrome browser but now uses its own fork called Blink. The Opera browser also uses Blink; previously, it used its own Presto engine.

Timeline

Presto (layout engine) Blink (web engine) WebKit KHTML Goanna (software) Gecko (software) EdgeHTML Trident (layout engine)

See also

References