God I hate Ajax

Published Sun, Jun 8 2008 22:11 | William

I was typing up a blog post earlier today and after 15 or so complete 5-10 second freezes, my browser finally crashed.  That was using IE 7.  IE 8 is a whole different story (and so, not a very good one).  So I started to think about how frequently my mobile browsing experience sucks.  Every single day, several times, I'll run into a huge browser hang or some other performance nightmare that just makes my blood boil. If it was just once a day, it'd be one thing. If it was just on the desktop or the mobile device, it'd be one thing.  But ever since the world decided that every single g-d page needs Ajax in it - the overall browsing experience sucks.  And as I think more and more about it, how nice it was at first not to deal with Postbacks, I started to think "Maybe there's a GOOD reason Ajax didn't take off .... 10 years ago when it first came out."

 Think about it for a second, there could certainly be valid reasons it happened, but why is it that Ajax was pretty much totally overlooked years ago when it first came out - and then 10 years later, Jesse James whatever his name is dubs it Ajax and the whole world is shaken.  WTF?  If it was really that awesome, wouldn't at least some significant portion of the market have realized it?  So here we are today - where you simply can't escape Ajax.  I mean, how many Flash sites have "Skip Demo" or "Non-Flash Site" available?  Why can't the same thing happen with Ajax?

When i think about my daily browsing, Ajax saves me a few minutes a day.  The Intellisense in Gmail is pretty helpful and I use that a lot.  There are a few other places as well. But on the whole, when I look at how much time I lose to my browser hanging for seconds at a time, or from it crashing - there's no doubt I'm at a net loss.  Now you might be thinking "But all those browser crashes aren't specifically from Ajax, it's not like browsers never crashed before".  Ok, there's definitely some validity to that.  But I know that I could count the number of times I got a "This script is running longer than expected" dialog box on my Pocket PC/Smartphone prior to Ajax.  And yep, I get it every single day now, several times. And in every case I've bothered to look into, it was Ajax.  I know on Community Server (one of the more frequent places), it's due to the Ajax loading on a few specific pages.  And good lord, what happened to Gmail?  I remember when I used to be impressed with how fast it was, as opposed to now where I tolerate how slow it is b/c I use Gmail for everything.   When I log in now, I'd fall over dead if I actually got gmail to fully load in under 10 seconds...  Thank God for the HTML only feature...something I wish a whole lot more sights would have.  Or at least a "This sight contains Ajax, hahahahahahahahahahahaha sucker" so I could be forewarned.

And I know, it's not Ajax's fault. Since it became trendy to use, people are putting it everywhere.  I am so old I actually remember when dev meetings centered around how fast a page could load as opposed to what features could be replaced with Ajax, but I digress.  So it's the overuse and lack of alternatives that's causing the problem. And eventually it will work itself out.  When it gets here, it won't be a second too soon.

Filed under:

Comments

# Rod Trent said on June 8, 2008 10:27 PM:

Sorry to hear about your browser crashing woes.  I bought a new laptop recently and have been very careful about what I put on it.

I've not had one single browser crash.  

Oh, and I don't use Gmail.  I may have used it a total of 5 minutes since Google stuck it in the never-ending beta cycle.  Don't feed the monster.

# Craig said on June 9, 2008 2:19 AM:

I agree some sites overdo the Ajax, but on the whole I  rarely experience the problems you do. I think the problems are combination of slow broadband and slow computer.

# William said on June 9, 2008 7:18 AM:

Craig:

Do you browse on a mobile device often?  If so, I'd be interested in hearing if you've had any performance problems.  I've used several different phones and it's pretty consistent with respect to where i have my problems.

I honestly don't think it's either bandwidth or hardware - it's pretty consistent and with one exception, my hardware and pipe are pretty intense.

Just this morning when i was approving these comments - it's a dual core pentium with 4gb of ram - it took about 4 seconds each once I hit the button to Approve.  I know I'm pretty impatient but it's the frequent crashes that irk me.  On a few sites I can cause the problem consistently on different machines so I'm not sure what the deal is.

# William said on June 9, 2008 7:19 AM:

Rod:

Yah, I should be more careful, there's no doubt.  I just had another crash this morning - on a totally different machine than where I had the one last night - although it's the same page so that has something to do with it (everything probably). The main thing is mobile browsing - I get crashes there constantly - rather, the Script running too long warning - which pretty much freezes the screen for 15 seconds before you can even hit Cancel on the warning box.

Do you do any mobile browsing?  If so, do you have any troubles?

# Jason Haley said on June 9, 2008 9:09 AM:
# DURON said on June 9, 2008 4:13 PM:

I have the same feelings about AJAX, too. I'm using Firefox, and it freezes up like mad when opening a few AJAX running tabs. No wonder web developers are switching to SilverLight for better overall performance.

# Grant said on June 9, 2008 11:53 PM:

Don't hate the technology, hate the implementation of that technology. Ajax has it's place, and it also doesn't. But it's really down to the web developer/designer to choose when to use it and what kind of experience it creates.

Personally, the Ajax Control Toolkit was making my site so slow and crap, i have removed it completely from my new site currently in development.

# KoW said on June 11, 2008 1:36 PM:

shhhht, AJAX's not turned southwards on the hype cycle yet. Wait for another 3 months with that ok?

# McNaz said on June 11, 2008 2:10 PM:

Sounds like IE is your problem here.

# What’s with all the AJAX?: CodingFresh Blog said on June 11, 2008 5:49 PM:

Pingback from  What’s with all the AJAX?:  CodingFresh Blog

# James said on June 11, 2008 6:12 PM:

<i>Don't hate the technology, hate the implementation of that technology. </i>

Grant,

I must object.  Don't hate the playa.  Hate the game.  Developers aren't in control of the things being asked of them.  Performance is only a concern after everything crashes.  Before that, management asks for feature they have seen on every other site, and, building up their in-house cred, developers generally comply -- usually by grabbing the tools most readily available, such as the ACT.

Changing the game probably means going to Silverlight and putting out to pasture the developers who won't jump on the band wagon.  Then, perhaps two or three iterations later, we'll be having the same conversation about Silverlight's short comings.

On the other hand, it will be fun in a few years when we will be able to look down our noses at AJAX sites and comment on their 'old school' style.

# wow.... said on June 11, 2008 6:42 PM:

I read this article soley for the title and usually dzone has some good authors. Than I noticed your tagcloud -- silverlight, .net, c#, etc. etc. etc. You start off the article with you admitting to using IE7! What you are experiencing is not the fault off a technology but the fault of every idiot and their mother thinking that (s)he should be a programmer -- would you all please just get the *** off the net and leave the real programmers to do their jobs!? Please!? I know computers are popular now but *** -- take your non-coding asses and GTFO! Ajax as the technology it is -- background http requests is one of the better things that could have ever happened to the net.

# William said on June 12, 2008 1:02 PM:

@Wow - with all due respect man, if you reread what I said, I use many browsers.  I think it's pretty clear that I don't think AJAX itself is evil or bad - and that as a technology, I think it's good. I agree 1000000% that there's too many bubble gummers writing code and that it's the implementations that are screwed up.  

With that said, there's currently too much overuse and mistaken use.  The problem isn't Ajax per se, but what people are doing with it. But like I said, I remember when people used to obsess over load times and compatibility - now it's like everything has changed to simply "Do we do it with Ajax"... and the implications suck.

To me it's a lot like Heroin - in and of itself, it's a great analgesic and has tremendous upside potential. But in practice, many that use it destroy their lives with it or at least really screw up their lives for a period of time - that's pretty much how I see Ajax. The solution isn't to eliminate opiates, it's for people to use them more wisely - the same holds for Ajax.  I however, won't be holding my breath.

# William said on June 12, 2008 1:03 PM:

@Grant - I don't hate the technology - although that's the title - I thought I made it clear. I agree with you completely - my whole point is that in the current incarnation, more implementations suck than are good - well , more precisely, the ones that suck are way worse than the ones that don't are good.

no disagreement witcha man - it's all about the implementation

# William said on June 12, 2008 1:06 PM:

@McNaz - It's not just the browser - b/c it doesn't just happen with IE... firefox, opera both have the same Ajax issue on the pages I'm talking about.

Search

This Blog

Tags

Community

Archives

News

My other sites

Cool Stuff

Book Stuff

Security

ORM

Data Access

Funny Stuff

Compact Framework Stuff

Web Casts

My KnowledgeBase Articles

My MVP Profile

Design Patterns

Performance

Debugging

Remoting

My Fellow Authors

My Books

LINQ

Misc

Speech

Syndication

Email Notifications