AJAX and the Back button

Sylvain and I have discussed recently his discomfort with Web browser state of the art in the age of AJAX (to use a grand term, even though I strongly believe that AJAX is nothing but an incremental gathering of conventions rather than anything new and special). He has gathered his thoughts in a blog posting "The chicken and egg problem". I posted a comment, but I thought I might copy the comment here as well.

[Let me summarize] in brief my reasons for thinking that the current system is not broken, and that we do not need to change anything fundamental about browsers.

First of all the basic semantic of "link history" in a Web browser has not changed since the Mosaic days for a very good reason: it is empirical to HTTP, REST and all that. At each point a browser is at a particular resource, and it moves from one resource to another according to actuation of simple REST verbs. Within each resource the browser can do all sorts of complex things, including showing animations (Shockwave, SVG, etc.), providing mini-applications to the user (Java applets, Flash, AJAX, etc.) and more, but the resource has not changed. The boundary of resource is defined by the service provider, and the browser simply reflects that in the history, URL bar and other features. I don't think the back and forward buttons should be overloaded for any operation within a resource. They should not be used as hot buttons in Flash apps or in AJAX apps. This violates the layering that is so important to the success of the Web.

If service providers want to provide navigation within a particular resource, they should do so within the application, and not at the REST level. I want my Front office app to have an "Undo" button (which makes much more sense than "Back"). [Why do I need chameleon browser chrome when I can just do <xforms:button id="undo"><xforms:caption>Undo</xforms:caption>...</xforms:button>?] When I click browser "Back" I want that to exit the application and go to the previous resource.

IMO People think they have trouble with the back button and Ajax because they do not appreciate protocol layering very well, and because the AJAX tools do not yet help in this understanding. I think a better understanding of this layering and better tools are what's needed, not a major redesign of the browser idiom.

[Uche Ogbuji]

via Copia
4 responses
The idea is downright silly and it doesn't surprise me that the suggestion comes from AJAX proponents.  I've said it before that AJAX is one of many current buzzwords that need to executed w/out pause (web 2.0 as well).  I've also said that AJAX is nothing more than a catch-phrase for a UI scripting technique that has more to do with javascript than HTTP and distributed web-based application.
Hi guys,



Chime, I think I need to clarify a little the situation behind my blog entry.



Everything started with a message on the new W3C WebAPI mailing-list. That group aims at giving recommandation towards the use of Ajax technics and to a larger extend, to client side web application. That message was a question about how to workaround the problem raised by application using Ajax technics when dealing with the back and forward buttons.



When I arrived on the discussion, I already had an idea in my mind but it was blurry. Then after many discussions with Uche (poor mate, I've lost you so many times with my tswited ideas ;)) and M. David, my root idea stirred up. That article was one attempt for me to clear my mind.



The problem though is that the entry is not clear that the Ajax issue really doesn't concern me much per se. It is something that should be addressed but it is not my immediate concern. That being said, I do thing that although, and I agree with both of you guys, Ajax is not the chosen One, it is certainly the term that has gathered enough strength in the last months to make everyone look at the same time at the same place. Besides that, it's because Ajax has been such a fashion that problems coming from the client side of web application have been able to be taken into account. I'm not going for Ajax, I've learned the hard way it was more or less a dead end for many tasks (a mi me gusta mucho XForms) but I'm not sure it's the smartest thing to do not to take the train while it allows boarding.



Anyhow, to come back to the article, the bottom line was NOT Ajax. The idea I extended on a private email with Uche and M. David is that maybe it could be the right time to reduce the gap between web applications and browsers histing them.



My main and specific idea was about a new control button that could be added to browsers and could be called "Related". The idea is not new, it builds on the fact that users viewing a resource may be interested enough to keep going with other resources. Currently they need to go through a search engine or to follow links from the resource itself. Now imagine those cases:



1. The user can't find proper keywords to make a good search with the search engine

2. The resource viewed is a few years old and there might be newer related content

3. The resource is so dman specific that it's impossible to find anything from a search engine



My idea is that, when the resource is being loaded from within the browser, what's to stop it to query, based on keywords (present in the resource), a set of service which could inform the browser of related content based on those keywords, but also popularity, timeframe, etc. In that case, you take the load off the user and make things smoother.



One could imagine for instance to build that button and query Google via its API for example but there are ways other than that.



Anyway, that was the main point of my article which sadly I didn't make clear enough.



- Sylvain
Hi guys,



If you are really looking for a website that is built in AJAX and has the full funcitoning back button and Page refresh and cookies working, look at  www.optionmonster.com . You can navigate back, forward and also refresh the page and it will keep you at the page where you were last. The website is written on Web2.0 and is an real-world example of how AJAX can be used, keeping the fundamental features of browsers in place.
The OptionMonster Website is really cool. Its a real good example of AJAX and implementation.Even the Back Button and page refresh works properly.!