Professional Documents
Culture Documents
Web applications are making quantum leaps in sophistication, complexity and functionality in
many areas they are surpassing traditional desktop applications. Increasingly powerful devices, a
wide variety of JavaScript libraries, and the growth of cloud-based services is transforming whats
possible with web applications.
Browsers play an important role in this world. Browser inconsistencies have plagued the web since
its early days. Microsoft tried to co-opt browser standards by leveraging Internet Explorer
dominance violating the HTML spec left, right and center. Then, with the arrival of Firefox,
Chrome and Safari, the browser landscape got even more interesting.
At the same time, websites were evolving. They began as simple, static web pages with little or
no JavaScript. Then HTML5 created the possibility of complex web apps on browsers. To add to
this, the appearance of mobile devices with full-featured browsers based on WebKit created
hundreds of new possibilities.
Yet as we approach 2015, incompatibilities still create hurdles in the development of complex
webapps. While DOM abstraction libraries like jQuery take care of most DOM-level inconsistencies,
some are still left for the developer to struggle with. While browser vendors are focused on
creating differentiation, users and developers are experiencing lock-in. This is a very serious
hurdle to the Open Web. Vendors should adopt open standards and differentiate themselves with
the Layout Engine and the Rendering Engine.
Let me get more specific now. During the development of our browser virtualization
client Nanovisor.js, we saw several issues on browsers which were inconsistent and sometimes
baffling. These issues forced us to have special-case handling for different browsers, which makes
code complex and difficult to maintain.
In this blog post, Id like to share some of these with you and give the browser makers my wish list
for the holidays. Heres to wishful thinking :-).
First, let me add a caveat to say that this is by no means an exhaustive list of the issues we have
seen. Ive selected a handful here to make some key points. Let me start with Safari since it is the
browser with the largest number of issues we faced, and is important from a customer deployment
perspective.
Source: NY Times
window.addEventListener('DOMContentLoaded', function() {
var lis = [];
lis.length; i++) {
Object.defineProperty(Lisnew, i, {
get: function() { return lis[i]},
set: function(val) { lis[i] = val}
})
}
Crashing of the browser has very serious impact as it cuts off a set of customers (OS X, iOS users in
this case) for webapp developers.
Wish List #3: Deprecating features flip-flop of Chrome, W3C and Firefox
Deprecation is part of spec development and needs to be done with extra caution, clear
communication, wider consultations and experimental analytics.
Earlier this year the W3C changed the DOM spec to remove Attr.ownerElement. Chrome followed
the spec, and released Chrome 34 with it removed and then added it back in Chrome 37.
Meanwhile Firefox removed it in 29 (Aurora) and reverted the change when the final version came
out.
This bug created much confusion, as different people were testing on different browsers.
Conclusion
So there you have it. These are some of the top of mind issues that we encountered during the
Nanovisor development process that reinforce that writing cross-browser software is difficult,
frustrating, expensive, and thereby likely to drive lots of developers away from the web rather
than encourage them to embrace it.
It is high time that browser vendors come together and clear out these long-pending, annoying
inconsistencies. Thankfully Internet Explorer has been doing this starting with IE10. They are not
finished yet, but they have made a welcome start.
Consistent browser behavior is important and a requirement for the success of an Open Web.
Browsers riddled with inconsistencies will keep on eating away at developers time and money
(not to mention their sanity). Browser makers need to come together to remove older
inconsistencies with a mechanism that provides enough time for developers to eliminate
dependencies in their code that exist due to these.
Safari is the most inconsistent, crash-prone and buggy browser, well on its way to becoming the
IE6 of the HTML5 world. Chrome is trying to push the the native platform PNaCl. Perhaps their
intent is to create stickiness and trap developers to their app platform for their obvious benefit.
Yet, I would like encourage them this holiday season to take some decisive action on this front and
help create a world with consistent browser behaviors for developers and thereby, for everyone
that uses the Internet. I hope Im not dreaming of an impossible utopian world.