With Apple just having released Safari for Windows and people wondering exactly why, I wanted to put out my thoughts on Gecko versus WebKit. I may well be wrong on some of the technical and historical points here, I’m just going on what my understanding is and my opinion on the two engines. Please do correct me in the comments, I’m sure I’ve made some mistake somewhere. I just want to put out my opinion on this.
At the moment, Gecko has the edge in terms of compatibility. There are only few sites that do not render properly in it, and it does very well as a rendering engine.
The problem is – Gecko was designed for Netscape 6 for Windows. Netscape 6 was a complete disaster, but the Gecko rendering engine survived and made it to where it is today.
Unfortunately, it still carries around baggage from those NS6 days. Gecko wasn’t really built for what it is doing today (although it is doing a pretty damn good job at it). Add to that the complexity of some of the architecture like XPCOM and XUL, Gecko starts to look quite heavyweight.
XPCOM adds a lot of code for marshalling objects between different usage contexts (eg. different languages). This leads to code bloat in XPCOM based systems. This was one of the reasons why Apple chose KHTML over the XPCOM-based Gecko rendering engine for their Web Browser[3]. Source
Apple chose to fork KHTML and built WebKit over implementing Gecko because they saw the value of KHTML being light, speedy, developed from the ground up for these things. In the long term, WebKit’s architecture is probably a better choice for Apple.
Do you really want to carry around Netscape 6 on your iPhone?
As far as compatibility goes, I think things will only get better now that Safari runs on Windows.
As much as I love Gecko, use Firefox, advocate Firefox and will continue to use it in the future, I think Apple made and are making the right decisions with WebKit and the Safari platform.
Just my £0.02.
I would love to see a browser like Firefox in terms of features rebuilt with Webkit. Firefox is a power browser and Webkit is a powerful rendering engine… take the best of the two, stick together, stir well… bake for 30 minutes… and you have the next generation of browsing.
I think Firefox needs to rethink a lot of its future with this new threat from Apple. Drop XUL (or dramatically redesign it – from the ground up) and start focusing on minimalism. Right now they have too much extra junk. In my opinion, anyhow.
and here comes google chrome to do just that.