Six Ajax Problems That Make Your Application Look Dumb

Hello first time visitor!

Do you remember how websites looked 3-4 years ago? There was no Ajax at all, maybe only some fancy useless HTML. Is it now better? In general, I think yes. But Ajax is often being a bit abused, and what’s worst people want Ajax in their web applications no matter why. This forces many web developers put ajax everywhere often without to consider several serious issues.

1. Ajax does not declare functions

If you hope to declare functions in Ajax loaded javascripts and call them during execution time you’ll get an unpleasant surprise. It does not work. You need to declare your functions in the loaded page, not in the ajax response. However if you want to call existing functions in your ajax-generated code, no worries, go ahead.

2. IE caches GET requests

Internet Explorer knows how to cache the ajax response and is not afraid to do it. In fact it loves cache so much that you won’t be able to use the dynamic effect of Ajax call to the database if you send your request by GET. If your ajax calls the database, stupid IE keeps returning cached data even if you refresh the entire page.

Solution: Use POST calls. I know it’s slower, but how does it matter when GET does not work well?

3. Ajax does not upload files

If you have an ajax loaded page and you want to include a file upload field in it, I have “great” news for you: it does not work. What, is it not news? Poor you, you have already realized one of the ugliest limitations of ajax. Because of it, the developers need to all kind of gimmicks or use third party scripts with hidden iframes to make file upload works. That’s far away of web standards, user friendly code and search engines.

Hey, if all your users are geeks who browse with Firefox and like to poke config files, you can use this idea. Cool, eh?

4. Ajax causes memory leaks

See here.

5.  How To Make Back/Forward Buttons Work On Ajax Page?

No, this is not a rhetorical question, I am really asking you how. Because I don’t know. Wait, I asked Google and he said this. Does it look simple to you?

Ajax Sucks For SEO

If all you care is to make fancy website, go ahead, use ajax everywhere. If you partner with popular websites or have big bucks for advertising, you’ll have no problems. What, do you say you are on a budget and hope to get visitors from the search engines? Forget either about Ajax or about Google.

Do you know more things that Ajax makes to help you look dumb? Go ahead, share them.

P.S. No, I am not saying don’t use ajax. I’m just pointing few things that suck.

2 Responses to “Six Ajax Problems That Make Your Application Look Dumb”

  1. Hello! I could have sworn I’ve been to this site before but after browsing through some of the post I realized it’s new to me. Anyhow, I’m definitely glad I found it and I’ll be bookmarking and checking back often!

  2. First off I would like to say fantastic blog! I had a quick question that I’d like to ask if you do not mind. I was interested to find out how you center yourself and clear your head before writing. I’ve had difficulty clearing my mind in getting my thoughts out there. I truly do take pleasure in writing but it just seems like the first 10 to 15 minutes are generally wasted simply just trying to figure out how to begin. Any suggestions or hints? Kudos!

Leave a Reply