Wednesday, October 24, 2007

Web Browsing - Webkit, Gecko, KHTML... etc.

One of the most infuriating things I find is that webbrowsing is inconsistent at best using them. Let's take, for example, Konqueror.

I open Hotmail one day and it works, then the next it doesn't. Similarly with Google, I have to set a browser agent, and then not all the features work. Why?

Well, there are many reasons:

1) Web developers who use broswer/engine specfic enhancements often have checks in the HTML for a specific minimum browser. If the check fails, either the site is crippled or just plain will not work. I disagree with browser extensions to the HTML language in general, and especially designers who do not allow for other browsers to work.

2) Designers who do not use any extensions, but still feel the need to limit the web site to Firefox/IE. This is quite evident by the sites which work 100% when setting the browser agent. If this actually works, then the site should be designed to simply work without these silly checks.

3) Too many browsers/engines to develop and test for. This leads to inadequate development from the web designers as they cannot test all browsers and engines to the same degree. This means they pick the ones with the most exposure and/or market share.

How do we address these points?

1) Browser specific enhancements - Instead of web developers testing for a specific browser and failing immediately, why not write a test for the feature. If the feature exists, then use it; otherwise, implement a work around. Better still, do not use browser/engine dependant hacks on the global internet. Restrict them to internal corporate use, where the browser choice is more deterministic. As a web developer, you have the responsibility for your entire audience and their overall experience.

2) Using browser checks for no apparent reason - this is just lazy and bad web page design. If you have a web page with standard Java/JavaScript and no specific IE/Firefox extension requirements, then don't limit your audiences choice of browser by simply sticking in random "if browser agent != IE/Firefox then cripple/die". If you have no reason to require a specific browser, then simply test for the features you need, like java, and if they work, great.

3) Browsers and engines - This is where things get personal, and there will be clashing of personalities as developers all scramble about claiming "my browser is better" and "this engine is the best". Grow up. The reality is that if we all want to make the best browser and engine for the internet, we must all contribute and work together. In Konqueror, we have KHTML and the great opportunity to use Webkit - a long time fork of KHTML, which is now used in Safari, the MAC browser. Why is it important? Well, from a development point of view, we have Apple backing changes, which has it's merits. In addition to Apple, we have TrollTech which is incorporating Webkit into Qt. If web developers work with Apple and TrollTech to ensure web pages load correctly, wouldn't KDE benefit from using Webkit as a backend? I would certainly agree.

Look, the bottom line is people who develop KDE and KHTML are passionate. I get it. I really do. However, let's use that passion for the betterment of everyone. If that means taking a fork of Webkit and adding some KDE specific fixes to the engine, then let's do it. At least we are moving forward and will be able to get some better browsing along the way.

I've seen a few blogs recently about this, and I am disappointed that there appears to be no clear decision. Are we still so disorganized, that we are arguing over which engine? Look, if it means that much to the KHTML developers, when not allow Konqueror to support different backends. Let users decide if they want Webkit or KHTML and see which fares better. I assume this could be done...

Anyway, here's to hoping for a consistant feature rich browsing experience from my favorite desktop and browser - KDE/Konqueror.