Chapter 20. Fixing Bookmarks and Back/Forward Buttons
Ajax applications have a number of distinct advantages over “classic” web applications, but the disadvantages inherent in the concept should not be ignored. One of the more glaring shortcomings is that it won’t work without JavaScript and a fairly modern browser. Right out of the gate, this excludes between 5 and 10 percent of users (this number can be significantly different depending on your specific target audience). One of the more annoying shortcomings is its lack of support for browser bookmarks (“favorites” in Internet Explorer) and the forward and back buttons—two fundamentals of the browser interface.
Breaking with such traditions is not only considered rude, but usually comes at a price. In 2006, Live.com was launched. Its search engine module made use of a lot of Ajax effects. So much so, in fact, that it actually knocked the back button out of commission. A public outcry ensued, and back button support was added within a few days. This required a considerable amount of JavaScript sleight-of-hand and ended up causing some clicking sounds in Internet Explorer (due to information in a hidden frame being reloaded in some scenarios). More public outcry followed, and a third version finally stripped the offending functionality. Live.com now works as expected, with both bookmarking support and forward and back buttons enabled.
The reason for the missing bookmark functionality lies in the fact that Ajax applications try their ...
Get Programming ASP.NET AJAX now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.