Thursday, November 15th, 2007

Ajax, Browsers, Running Out of Time

Category: Browsers, Editorial

History repeats itself, first as tragedy, second as farce. — Karl Marx

I can remember the day, back in 1994, when I abandoned the Mac for Windows. It was a gloomy, overcast day when I made that bittersweet decision — I was a Mac and Unix nerd all through college — but after my twelfth or thirteenth crash of the day, I had had enough. Photoshop, Netscape, Secure Shell and Word were just not meant to run more than one at a time on Mac OS 7. Had I stayed with Apple through that rough patch I’m sure I would have been slimmer, sexier and happier, but NT 3.51 only crashed twice a day, so my hand was forced. I ran out and bought a PC that very day.

Now I fear history may be repeating itself. Yesterday, I had Firefox 2 for linux crash 5 times, and IE7 for XP crash 7 times. The cause? Too many fat Ajax applications. Zimbra, the whole Google bestiary of applications, Yahoo Mail, etc.. These are all long running applications that I keep open for most of the day. Then all of a sudden the Browser is gone and I have to relaunch and login all over again.

I’m not alone in this. Colleagues and friends report similar problems with Safari/Mac, IE7/Vista, Firefox/Mac. I’ve even checked with a friend that runs the helpdesk for a large firm: reported problems with browsers are up. The only one who seems blissfully unaffected is the lone Opera nerd in my office. He just keeps chugging along with what seem like 200 open tabs.

The cause should be evident to everyone. We’ve taken what was first called LiveScript — a crufty embedding just good enough to validate a form or two — and we’ve abused it into being the foundation for a whole new kind of application platform. The browsers have just not kept up and the situation will only get worse with the accelerated proliferation of Web 2.0 apps.

Help is on the way, in the form of bytecode interpreters and vm’s for Safari and Mozilla, though the future of IE is still cloudy (still, there is a plan to bring Tamarin to IE). But if the new Browser version don’t arrive quickly enough, or if they don’t fully solve the problem of browsers crashing once an hour, then a mass migration to Opera may be the best we can hope for. At worst, content and application producers will opt for more stable non-Ajax alternatives such as Flash or Silverlight.

Ajax and the browsers it depends on are running out of time. If the notion spreads that it isn’t reliable, it will be as dead as the Java Applet, never to be heard from again.

Posted by Dietrich Kappe at 10:33 am

4.2 rating from 111 votes


Comments feed TrackBack URI

I’ve been using opera for the last 5 years and never been disappointed by it.
Its true thats some web2.0 apps don’t work in Opera. But is that the fault of the browser or the developer?

Anyway the difference between opera 9.24 and opera 9.5b is so huge that i would recommend the beta over 9.24

Comment by Bart Stavenuiter — November 16, 2007

What a great issue to see on Ajaxian! The real issue here has been going on for over a decade: the web wasn’t designed to do all this shit, but never underestimate the value of a lightweight protocol.

In the late 90s, our designs became too top-heavy and unmaintainable, then CSS took off and we reeled that sucker back in (half-way anyway).

Now we’re seeing Javascript and AJAX techniques hit a similar point of complexity where really really cool stuff is being done on a daily basis, but the whole mess is a bit convoluted and unmaintainable. These problems are being addressed in an organic fashion from all corners of the market, but open platforms take time to evolve. Considering gmail was released just 3.5 years ago, I think progress is actually pretty rapid.

Comment by Gabe da Silveira — November 16, 2007

Ok, i keep hearing everyone that i need to open only one site at a time, and not add any extensions on firefox. Maybe i should hop on one foot and bark like a dog while am at it, or call an excorsist to get the beasts out of my pc. But since my first 386 machine where i couldnt open more than one site at a time things have changed. And i want to open 20 tabs at the same time. And i 3 of them to be ajax sites, and 3 to be youtube videos. And i dont want my browser to crash. The dude is right. I have 3 boxes, one of them linux. Crashes on all of them. One doesnt even have extensions installed! So the problem is with the browser. And i’ve tried several. Opera, IE, Safari… As soon as you open more than 5 tabs, things start to slow down.
Well, we’ve got the horse power to handle the load now. Our machines are fast and furious. Only the browsers are falling behind…

Comment by web freak — November 16, 2007

Just remember that statistics can be really misleading sometimes. If you’re reading this article you’re probably in the business, so to speak, and conducting a survey at work, where everyone’s interrested in cool Web 2.0 pages and probably use alot of them, might not reflect the general usage of such web pages.

Comment by Anders — November 16, 2007

I already got the CTRL + H thing; unfortunately, as the manual says, this shortcut hides Opera (all windows) and i need at least one window visible :)
The MinimizeToTray extension on Firefox allows me to simply CTRL + SHIFT + M undesirable windows.

Yes, i used to develop with the Opera’s Developer Console. It’s cool, however, Firebug is a better choice, IMHO; i think on this way because of things like disable one CSS declaration by a simple click on it’s left side, type JavaScript commands which run immediately on console, among other reasons that makes FB more suitable for my projects.

And, above all, i don’t have any additional tab with Firebug :)
(Oh my God, i have typed all this comment on IE7… call me “heretic” :P)

Comment by Hudson Tavares — November 16, 2007

Ha ha ha ha ha ha ha ha ha

This thread seems to be requesting that browsers to perform reliably, on a site dedicated to programming your browser to do new and unpredictable things.

Anyone who reads this site is in a position where they want the browser to be an OS. The browser ain’t an OS, or at least it isn’t a robust multithreaded one that can deal with crashes. No one (except Marat) has grasped the value of an OS, which is that IT CAN RUN BAD APPLICATIONS without itself crashing. This is the request buried in the original post.

Comment by Travis Wilson — November 16, 2007

This article is truly absurd. Using the convoluted anologies of doom, I have reverted to using Lynx and a text based OS… because as we all know, just like the Mac and Windows, when those were single threaded and did not perform particularly well it doomed the entire windowed interface concept.

Give me a break… No specifics.. just rubbish. While I have certainly experienced browser crashes, it is certainly within the realm of all other applications where I open/close/ interact with on a constant basis.

To speak of specific issues such as threading or memory usage/leakage make sense (and indeed appear here often), but to go on some diatribe of doom really causes you to lose all credibility. Just like everything else in the computer era, things will adapt and improve. It is that simple. Just as that have with countless other things, including the browser itself…

Finally, think back to the original dial-up access to the Internet.. or the horrible experience of Netscape or Internet Explorer 3 compared to the now… Given your doom based outlook, I am shocked that anyone even uses the Internet given the horrible experience.

Comment by benb — November 16, 2007

Well said, Travis.
I think the overall point should be:
JS was once a kiddie scripting language (see debugging with Alert(), which only recently went away). JS has grown up with the browser to be extremely powerful and has been extended in many non-standard and half-supported ways. Now we have reached another milestone where the concept of programming safely for the browser needs to be (and is being) revisited: standardization, ECMAScript 4 discussions, sandboxing, memory allocation… We all seem to agree JS is plenty powerful, and now we have frameworks and techniques that allow web programmers to build truly rich applications.

However, every technology goes through it’s adolescence, where widespread adoption leads to lots of bug discoveries, quick fixes are made, and then the foundation of the product is improved. This is a product lifecycle.

No one is going to abandon teh intertubes, or its flashy, new, cool apps that make users feel cool, and make investors sign checks; the browser and ECMAScript are not dead; and yes, users are used to and will tolerate crashing in order to run the cool stuff they like. See Myspace, for example. Running out of time?? I’m running out of time writing this post when I should be writing the next Google.

Comment by Charles — November 16, 2007

Absolutely Travis. What we are trying to achieve is literally over loading the browser like an OS which it isn’t. But from another aspect, if our apps must move forward and be more innovative, the browser itself must be able to catch up with the speed and act more as a platform rather than an app itself.

Comment by Simon Jia — November 16, 2007

Something’s wrong with your computer.

I don’t bother keeping multiple web-mail sites open all day (just Google Reader), but I almost never have crashes with Firefox in WinXP or OS X.

@Eric – Sorry, you Fail. Completely. Hop aboard the failboat. There’s not something wrong with his computer. Perhaps if you used some real Ajax applications or did some real heavy ajax development for long periods of time you’d notice this happening. Everybody at my workplace experiences it, I expereince it, by the looks of this thread many others experience it.

Which leaves the only options to be that you are a superman with a supercomputer with superpowers, OR, you are a novice who doesnt have heavy enough usage to push your browser to its limits.

Comment by Gavin — November 16, 2007

Updating the script engines in any way will not reduce crashes. I haven’t seen a script engine crash in years. The thing that crashes is usually the rendering engine due to changes and states in the DOM that the browser manufacturer didn’t anticipate.

Comment by Erik Arvidsson — November 16, 2007

I agree with Kyran. If you want to try Opera, try the latest 9.5 beta. It’s much faster than any other browser on the market! And most sites that looked broken in Opera 9.24 are perfectly rendered, now. And it never crashes (well, almost). For me it is so stable, fast and compatible that it has become my default browser, even if it is a beta!!!

Comment by Upanisad — November 17, 2007

Dude, I’m sorry to hear everything keeps crashing in your computer… I’m using Firefox ( which is the current one) and it crashes about 1-3 times a month… oh yeah and I’m a web developer so I do a lot of Javascript debugging and probably thousands of refreshes a day.

Which Linux dist. and FF version did you run when it crashed last time?

Comment by Web Design NY — November 17, 2007

From a JS SysLib coders point of view ( assume I see heavy crashes all the day on all browsers):

(1) I agree that a lot of the libs out there are eye candy. Unfortunately I have the feeling they are developed with only one open browser tab in mind. Same applies to the applications we see. This feature centric point of view in development is emberrassing and in fact it is the reason for so many crashes.

(2) I maintain an asynchronous lib – its all about continuations, but a tad heavier than the code sample presented here lately. Handling browsers resources ( rendering, requesting and processing management ) in my eyes is essential to successfully code heavy apps. So far I have yet to see an application that is built on resource management principles. If you know one, please give me a hint.

(3) I spend the last 2 weeks refactorizing 200 lines of code in my lib. It is obvious to me that no company is willing to spend that money on improving their product at a point where nobody can see it – simply because there is no financial need to do so. We all live with those crashes, and happily keep on using the applications. So why?

The point in it is: we will keep seeing these crashes, because we jump on eye candy. And we trade eye candy for stability and we are happy with it. So we get what most of us desire ( a marketing principle ) and live with the consequences ( a coding principle ).

Comment by Frank Thuerigen — November 18, 2007

Leave a comment

You must be logged in to post a comment.