Open main menu

A browser engine (also sometimes erroneously referred to as a layout engine or rendering engine) is a core software component of every major web browser. The primary job of a browser engine is to transform HTML documents and other resources of a web page into an interactive visual representation on a user's device.


Name and scopeEdit

A browser engine is not a stand-alone computer program but a critical piece of a larger program, such as a web browser, from which the term is derived. (The word "engine" is an analogy to the engine of a car.)

Besides "browser engine", two other terms are in common use regarding related concepts: "layout engine" and "rendering engine".[1][2][3] In theory, layout and rendering (or "painting") could be handled by separate engines. In practice, however, they are tightly coupled and rarely considered separately.

In addition to layout and rendering, a browser engine enforces the security policy between documents, handles navigation through hyperlinks and data submitted through forms, and implements the Document Object Model (DOM) data structure exposed to page scripts.

Every major web browser embeds a dedicated JavaScript engine. A browser engine should not be confused with the JavaScript engine used in that browser (if any). Although originally conceived to allow author-defined interactivity on a web page, JavaScript (JS) is a general-purpose programming language that has applications outside web pages. Accordingly, major browser vendors develop their JS engines as independent and easily separable software that avoids reliance on browser engine internals.

Browser engines themselves may be used in other types of programs besides web browsers. For example, Electron is an application framework that makes use of Blink and V8, which are primarily developed for the Google Chrome browser. An email client might include a browser engine to display HTML email.

Layout and renderingEdit

In a browser engine, the layout of a page is specified by HTML with optional hinting by Cascading Style Sheets (CSS). Each style sheet is a series of rules which the browser engine interprets. For example, some rules specify typography details, such as font, color, and text size. The engine combines all relevant CSS rules to calculate precise graphical coordinates for the visual representation it will paint on the screen.[1]

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

Notable enginesEdit

Browser usage on Wikipedia during February 2014
Google Chrome, Opera and other variants (Blink)
Internet Explorer (Trident)
Firefox and other variants (Gecko)
Safari and other variants (WebKit)
Opera (Presto)
Non-mobile web browser usage for Wikimedia visitors during February 2014.[4]

Because the Web platform is a set of open standards, there are multiple browser engine implementations.

Gecko is Mozilla's browser engine, used in its Firefox web browser, the Thunderbird email client, and the SeaMonkey internet suite.[2] Goanna is a fork of Gecko used in the Pale Moon browser.[3]

Apple created the WebKit engine for its Safari browser by forking the KHTML engine of the KDE project.[5]

Google originally used WebKit for its Chrome browser but eventually forked it to create the Blink engine.[6] All Chromium-based browsers use Blink, as do applications built with CEF, Electron, or any other framework that embeds Chromium.

Although Apple permits third-party browsers as alternatives to Safari on iOS devices, all browsers distributed through its App Store must use WebKit as their engine. For example, Opera Mini for iOS uses WebKit, whereas all other Opera variants use Blink. (Opera formerly used its own proprietary Presto engine.)

Microsoft formerly developed its own proprietary browser engines, Trident and EdgeHTML, but now uses Blink for its Edge browser.[7][8]




  1. ^ a b "Behind the scenes of modern web browsers". Tali Garsiel. Retrieved 2018-04-21.
  2. ^ a b "Gecko". Mozilla. Retrieved 2018-04-21.
  3. ^ a b "Introducing Goanna". M.C. Straver. 2015-06-22. Retrieved 2018-04-21.
  4. ^ Wikimedia Traffic Analysis Report - Browsers e.a.: Monthly requests or daily averages, for period: 1 Feb 2014 - 28 Feb 2014, Wikimedia
  5. ^ Paul Festa (2003-01-14). "Apple snub stings Mozilla". CNET Networks. Archived from the original on 2012-10-25. Retrieved 2017-02-16.
  6. ^ Bright, Peter (April 3, 2013). "Google going its own way, forking WebKit rendering engine". Ars Technica. Conde Nast. Retrieved March 9, 2017.
  7. ^ Belfiore, Joe (2018-12-06), Microsoft Edge: Making the web better through more open source collaboration, Microsoft
  8. ^ "Microsoft Edge and Chromium Open Source: Our Intent". Microsoft Edge Team. 6 December 2018. Retrieved 8 December 2018.