Alex Bosworth makes some good observations in his list of Ajax Mistakes. I’m currently deep into tuning a pretty much 100% Ajax driven site, and comparing what I’ve built with what Alex has figured out is sort of eye opening. There are mistakes on his list that I’ve seen and have identified in my own app, and ones I hadn’t even considered.
One of those is pretty important – Google has no way of indexing my site. It can’t execute the Javascript required to display the data, and even if it could – it might still have a hard time parsing Javascript generated data. This presents an interesting challenge – I’ve already figured out how to build a permalink to any view within the app, but Google doesn’t know the rules to generate the URLs, so will still never see it. So do I build a page that displays every possible permanent URL so that all the data is indexable?
And also, because the app rarely, if ever, reloads the page the URL never changes. This causes all sorts of problems including, most importantly, totally and completely breaking the back button. I haven’t figured out a good way of making the back button work in a page that never goes “forward” in the traditional browser sense, but I know I’m not the only one working on the problem. Another Alex, Alex Russell has a lot to say on Ajax and back buttons, and has offered up a solution which I’ll have to try.
If I can’t solve those problems above, my app is little more than a poorly designed Flash movie, which isn’t something that sits well with me.