Gecko is designed to supportopenInternet standards, and is used by different applications to displayweb pages and, in some cases, an application'suser interface itself (by renderingXUL). Gecko offers a rich programmingAPI that makes it suitable for a wide variety of roles in Internet-enabled applications, such asweb browsers, content presentation, andclient/server.[3]
Development of the layout engine now known as Gecko began atNetscape in 1997, following the company's purchase ofDigitalStyle. The existing Netscape rendering engine, originally written forNetscape Navigator 1.0 and upgraded through the years, was slow, did not comply well with W3C standards, had limited support fordynamic HTML and lacked features such as incremental reflow (when the layout engine rearranges elements on the screen as new data is downloaded and added to the page). The new layout engine was developed in parallel with the old, with the intention being to integrate it into Netscape Communicator when it was mature and stable. At least one more major revision of Netscape was expected to be released with the old layout engine before the switch.
After the launch of the Mozilla project in early 1998, the new layout engine code was released under an open-source license. Originally unveiled asRaptor, the name had to be changed toNGLayout (next generation layout) due totrademark problems. Netscape later rebranded NGLayout asGecko. WhileMozilla Organization (the forerunner of theMozilla Foundation) initially continued to use the NGLayout name (Gecko was a Netscape trademark),[10] eventually the Gecko branding won out.[citation needed]
In October 1998, Netscape announced that its next browser would use Gecko (which was still called NGLayout at the time) rather than the old layout engine, requiring large parts of the application to be rewritten. While this decision was popular with web standards advocates, it was largely unpopular with Netscape developers, who were unhappy with the six months given for the rewrite.[11] It also meant that most of the work done forNetscape Communicator 5.0 (including development on theMariner improvements to the old layout engine) had to be abandoned. Netscape 6, the first Netscape release to incorporate Gecko, was released in November 2000 (the name Netscape 5 was never used).[citation needed]
As Gecko development continued, other applications and embedders began to make use of it.America Online, by this time Netscape's parent company, eventually adopted it for use inCompuServe 7.0 and AOL for Mac OS X (these products had previously embedded Internet Explorer). However, with the exception of a fewbetas, Gecko was never used in the mainMicrosoft Windows AOL client.[citation needed]
On July 15, 2003, AOL laid off the remaining Gecko developers and the Mozilla Foundation (formed on the same day) became the main steward of Gecko development. Today, Gecko is developed by employees of theMozilla Corporation, employees of companies that contribute to the Mozilla project, and volunteers.[12]
In the Netscape era, a combination of poor technical and management decisions resulted in Geckosoftware bloat.[11][13][14] Thus in 2001Apple chose to forkKHTML, not Gecko, to create theWebKitengine for itsSafari browser.[13][14] However, by 2008 Mozilla had addressed some of the bloat problems, resulting in significant performance improvements for Gecko.[15]
In October 2016, Mozilla announcedQuantum, an ongoing project encompassing severalsoftware development efforts to "build the next-generation web engine forFirefox users". It included numerous improvements to Gecko, taken from the experimentalServo project.[16][17] Firefox 57, also known as "Firefox Quantum", first shipped in November 2017 and was the initial version with major components from the Quantum/Servo projects enabled. These include increased performance in theCSS andGPU rendering components. Additional components will be merged from Servo to Gecko incrementally in future versions.[16]
In September 2018, Mozilla announced GeckoView, the foundation of Mozilla's next generation of mobile products based on a software library that makes Gecko reusable for Android, encompassing newer software development efforts to "decouple the engine itself from its user interface, and made it easy to embed in other applications". Firefox Focus 7.0, shipped in the same month,[18] is the initial version introduced GeckoView, with increased performance in median page loading.[19][20] Firefox Reality was also built with GeckoView.[19] In June 2019, Mozilla announced Firefox Preview as an ongoing project that focuses on building an Android web browser with GeckoView.[21] Firefox for Android 79, also known as "Firefox Daylight", first shipping in August 2020, is the first stable release of that with major components powered by GeckoView engine.[22]
In order to supportweb pages designed for legacy versions of Netscape and Internet Explorer, Gecko supportsDOCTYPE switching. Documents with a modern DOCTYPE are rendered in standards compliance mode, which follows theW3C standards strictly. Documents that have no DOCTYPE or an older DOCTYPE are rendered inquirks mode, which emulates some of the non-standard oddities ofNetscape Communicator 4.x; however, some of the 4.x features (such aslayers) are not supported.
Gecko also has limited support for some non-standard Internet Explorer features, such as themarquee element and thedocument.all property (though pages explicitly testing fordocument.all will be told it is not supported).[25]
After Gecko 2.0, the version number was bumped to 5.0 to match Firefox 5, and from then on has been kept in sync with the major version number for both Firefox and Thunderbird,[33] to reflect the fact that it is no longer a separate component.[34]
Quantum is aMozilla project encompassing severalsoftware development efforts to "build the next-generation web engine forFirefox users". It includes numerous improvements to Gecko, largely incorporated from the experimentalServo project. Quantum also includes refinements to the user interface and interactions.[16][17]
Firefox 57, released in November 2017, is the initial version with a Servo component enabled. Mozilla dubs this and several planned future releases "Firefox Quantum".[35][36][needs update?]
In 2012, Mozilla began the experimentalServo project, which is an engine designed from scratch with the goals of improvingconcurrency and parallelism while also reducingmemory safety vulnerabilities. Servo is written in theRust programming language, also created by Mozilla, which is designed to generatecompiled code with better memory safety, concurrency, and parallelism than compiled C++ code.[5]
As of April 2016, Servo needed at least several years of development to become a full-featured browser engine,[37] hence the decision to start the Quantum project to bring stable portions of Servo into Firefox. Mozilla laid off all Servo developers in August 2020.[38]
The Quantum project is composed of several sub-projects.[16]
CSS:Servo's parallelstyle sheet system integrated into Gecko. Benchmarks suggest that performance scales linearly with number ofCPU cores.[39] This was released in Firefox 57.[36]
Render: Servo'srendering architecture, called WebRender, integrated into Gecko in 2019, 2 years after the first Firefox Quantum release, Firefox 67. WebRender replaces theimmediate mode drawing model with aretained mode model that is more easily accelerated by theGPU by taking advantage of CSS/DOM's similarity to ascene graph. Worst-case scenario rendering in testing exceeds 60 frames per second.[40] Mozilla began enabling the new renderer for select hardware/OS combinations in Firefox 67.[41]
Compositor: Gecko's existingcompositor moved to its own process, isolating browser tabs from graphics driver related crashes. Since compositor crashes will not bring down the browser content process, the compositor process can be restarted transparently without losing user data. This was released in Firefox 53.[42]
DOM: Loosely inspired by Servo's Constellation architecture[43] andOpera'sPresto engine,[44] Quantum DOM uses cooperatively scheduled threads within theDOM to increase responsiveness without increasing the number of processes and, thus, memory usage. The core of this shipped in Firefox 57.[45]
Flow: An umbrella for user visible performance improvements driven by a team that works across Gecko components. Focused on real user performance improvements on majorwebapps, primarily G Suite (now calledGoogle Workspace) andFacebook.[46] This work completed and shipped for Firefox 57.[47]
Photon: AUI refresh of the entire application, with a strong focus on improving UI performance. Treated as a sister project to Quantum Flow.[48] This was released in Firefox 57.[35]
Network: Improve the performance ofNecko, Gecko's networking layer, by moving more network activity off the main thread, context dependent prioritization of networking streams, and racing the cache layer with the network.[49] This feature was released in Firefox 59.[50]
TheMozilla Azure project is a stateless low-levelgraphics abstraction API used inFirefox.[51] The project has several objectives including:
more accurate Direct2D compatibility
optimized state interoperability
improved control over performance characteristics and bugs
Azure will provide 2D hardware acceleration on top of 3D graphics backends. Firefox began using Azure instead ofCairo in 2012.[52][53] It is written inC++ and used byServo.[54] The Azure name is an ode to the early Netscape founderJames H. Clark and his earlier work atSilicon Graphics where workstations were often named after colors.[55]