A browser 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 scope
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. 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, browser engines enforce the security policy between documents and implement the Document Object Model (DOM) data structure exposed to page scripts. They also handle hyperlinks and web forms.
Browser engines may be used in other types of programs besides web browsers (just as different types of cars can be manufactured with the same engine). For example, an email client may need one to display HTML email. The Electron framework, which is powered by the two engines of the Google Chrome browser, has been used to create many applications.
Layout and rendering
The layout of a web page is typically specified 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.
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.
Apple created the WebKit engine for its Safari browser by forking the KHTML engine of the KDE project. Google originally used WebKit for its Chrome browser but eventually forked WebKit to create Blink, which is used by all Chromium-based browsers.
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.)
- "Gecko". Mozilla. Retrieved 2018-04-21.
- "Introducing Goanna". M.C. Straver. 2015-06-22. Retrieved 2018-04-21.
- "Behind the scenes of modern web browsers". Tali Garsiel. Retrieved 2018-04-21.
- Wikimedia Traffic Analysis Report - Browsers e.a.: Monthly requests or daily averages, for period: 1 Feb 2014 - 28 Feb 2014, Wikimedia
- Belfiore, Joe (2018-12-06), Microsoft Edge: Making the web better through more open source collaboration, Microsoft
- "Microsoft Edge and Chromium Open Source: Our Intent". Microsoft Edge Team. 6 December 2018. Retrieved 8 December 2018.