AJAX is great but what about the back button?

With the release of InstantForum.NET 2010 many of you will know we moved to a JavaScript & JSON (no-post backs) based approach for the InstantForum.NET user interface.

Whilst this move provides a very responsive interface & avoids a full page post back using compact JSON based web services to perform partial page updates there are obvious concerns with replying so heavily on JavaScript & partial page updates.

It's been obvious recently due to the volume of feedback I've received that you would like to be able use your browsers back button within InstantForum.NET as you would expect within a traditional non-AJAX web application as well as bookmark pages that are generated as a result of AJAX callbacks.

It's more challenging to enable the back button for AJAX based web applications as you need to manually manage the state of the page between callbacks & manually update the browsers address bar to reflect the current state of the page and allow users to bookmark pages.

With the recent 2010-3 update on Monday we've greatly reduced the bug count and currently are only aware of a handful of issues we still need to investigate.

We wanted to address the most common problem we see first.  I'm delighted to say we've made great process with the bookmarking & back button issues we've seen reported 

Bookmarkability - or is that bookmarking :)

With the next update of InstantForum.NET you'll be able to bookmark pages even after an AJAX callback. For example you may wish to bookmark an advanced search page or a specific page within a forum or on the member list.

Even though these features use AJAX to call JSON based web services and a full post back is never performed of the page you'll be able to bookmark AJAX post backs with all controls maintaining stage when you come to the forum from your bookmark.

For example click here.

Whilst this URL looks nasty the value after the # within the URL is all generated by JavaScript and never seen by search engines. It's based on the jQuery Back Button Query plig-in.

Back Button (We've not forgot about you)

Your back button will work as expected in the next InstantForum.NET update.

To test the back button works as expected click the link below…

Click a few pages within the list of results or change the sort order of results.

When you navigate to a new page use your browser back button to return to the page. You'll notice that even though the page is only partially updated via our JSON web services the state is maintained and your browsers back button works as you would expect in a traditional full post-back web application.

What about SEO with JavaScript UI?

We tackled the SEO issues early in the 2010 development cycle and always provide SEO friendly links for any clients / bots that can't interpret JavaScript. We use widely considered best practices for doing this.

We are always keen to improve things and will be looking at further ways we can offer better support for clients who don't have JavaScript enabled.

I look forward to posting further information soon. I should probably go it's 3.45 in the morning - oh boy :)

On a scale of 1-5, please rate the helpfulness of this blog entry

Not Helpful
Very Helpful
Optionally provide your comments to help us improve this blog entry...

Thank you for your feedback!

Add Your Comments

Comments require login or registration.