Browser kernel Gecko and WebKit

Source: Internet
Author: User

Webkit is an open source HTML rendering engine developed by Apple's KDE-based Khtml project. We've seen from Chrome's reviews that WebKit is a very lightweight rendering engine that has been praised for its compact, clean code base, excellent standard support, and a small footprint. These qualities make Webkit a hot-core choice for many browsers.

Webkit is used primarily for Apple's Safari browser with the IPhone, but some important vendors such as Adobe,nokia, Trolltech also use this core. Webkit's users also include some of the less well-known browsers, including ICab, OmniWeb, Shiira, and Epiphany. In some second-line operating systems, such as Haiku, syllable, and even amiga,webkit. More and more developers are using Webkit to develop rich internte applications (rich Internet applications). After evaluating many cores, Google chose WebKit for Android mobile browsers and Chrome desktop browsers. The developer's recognition of Webkit is that this is a very good rendering engine that can be used on many occasions, and its attractiveness has left many developers wondering if Mozilla's Gecko kernel has a market.

Why Apple resists Gecko

Gecko originated in Netscape, and was criticized earlier than Khtml,gecko for its vast and complex code base. Gecko is very powerful, but expensive, complex, and highly memory-intensive. As a result, the many functions that Gecko on many occasions have become a burden.

The Gecko kernel is too complex because Gecko intends to provide more functionality than HTML rendering. Mozilla's early ambitions were large, and Mozilla's earliest app suite included browsers, mail and newsgroup programs, Web design tools, and IRC chat tools. In addition to rendering Html,gecko, we also provide a widely used XML-based user interface generation engine, XUL. XUL is used in all of these programs. XUL is still used in Firefox to create a user interface, which makes Firefox the most valuable heavy-weight extension app.

Another reason Gecko is too complex is the XPCOM, a powerful component system. While XPCOM brings a lot of exciting features to Gecko to make this rendering engine modular, this feature is abused by some developers, and when Ars Technica2004 interviews Mozilla developer Scott Collins, Scott Collin S said that the abuse of XPCOM is one of the main mistakes of Mozilla.

Given the complexity of XUL and XPCOM, Apple naturally has to consider choosing a lighter kernel for Safari. Apple wants to design a browser that can be tightly integrated with the MAC operating system, and they also foresee that the engine should support mobile devices, and they realize that khtml is more appropriate than Gecko.

When Apple decided to use khtml in Safari in 2003, Mozilla's Mike Shaver in the blog to acknowledge Gecko's shortcomings. He also predicts that Apple will become a league for them to promote WEB standards. He wrote,

"Small and concise has been our pursuit of the goal, Gecko's huge and bloated in a variety of reviews pulled our scores, if I have to write a new browser, I will consider the choice outside of Mozilla." I want Mozilla to learn from safari/khtml because they have a great feature in the 1/10 code. ”

Gecko brings Firefox 3 to the hot

Many changes have taken place since 2003. Gecko code base has been developed for a long time, Gecko is still complex, but many of its legacy defects are being one by one compromised, Gecko for Firefox 3 brings many innovations, for the entire Web browsing experience to bring a significant improvement.

Gecko 1.9 uses a cross-platform Cairo rendering framework, and the huge improvements to SVG simplify the code and introduce some very Cool features, such as full-page scaling, while the reconstructed reflow algorithm makes Gecko through ACID 2 testing possible. Mozilla also significantly reduced the memory footprint, even beyond Safari and Opera.

The use of XPCOM has been greatly reduced, and the XPCOM of resources has been minimized by a new recycling collector. This work continues, Mozilla will further reduce the burden of XPCOM in Firefox 4. Gecko's other flaws are also being looked at in the new development one by one, for example, in the Alpha version of Firefox 3.1 has been added to the support of CSS 3, and some performance improvements will make Gecko more competitive. Mozilla's Tracemonkey engine will probably be included in Firefox 3.1, which will significantly improve JavaScript performance.

From a technical point of view, Gecko is now very stable, no worse than Webkit. Some evidence suggests that Gecko is moving into the mobile realm, which was not possible until recently. Mozilla has the resources, development experience, and community support that will guide Gecko into any site that Webkit can access.

Browser kernel Gecko and WebKit

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.