Ajax Back, Forward, Reload and PHP 52
IdaAshley writes "A major challenge of Asynchronous JavaScript and XML (Ajax)-driven Web sites is the lack of a Back button. Mike Brittain discusses ways to get around this obstacle in part 1 of the 'Developing PHP the Ajax way' series." From the article: "The Web is a page-by-page medium. The backward and forward buttons on your browser's toolbar direct the browser from page to page. When Macromedia's Flash became all of the rage, developers and users started to see how Rich Internet Applications (RIAs) break this metaphor. You might click around a few sites, land on a Flash-based Web site, then click around in it for a few minutes. One click of the Back button and the ride is over. Rather than going one step backward within the Flash site, you completely lose your place."
Stupid (Score:3, Insightful)
This is terrible, and does nothing to make the back button in the browser work. At best, it gives you an undo/redo in the applications. The back button not working is more of a symptom than the actual problem, and if widely implemented this kind of workaround is only going to distract and make it less likely that the actual problem get fixed.
Non-news (Score:5, Insightful)
browsers could support client-specified urls (Score:2, Insightful)
(Like when you change location.url -- it makes your browser actually go there, not just display different text in the address bar.)
Something like "Link to this page" could be implemented as a standard, so that when you're viewing an AJAX site, the "bookmark" button could be given a special URL that would actually go back to that page as intended, which the AJAX application would have to be programmed to support. The link that is actually bookmarked might differ from the one you used to get to what you are viewing, but is guaranteed to get you back there if you click it.
On the other hand, a system like that would also be very ripe for phishing exploits, so never mind.
Tools that Support This (Score:5, Insightful)
Already been integrated into browser (Score:5, Insightful)
I'm 99.5% positive that Adobe Flex can help address using back/forward buttons in the browser and Google has code to do this with Ajax. If I'm not mistaken, Gmail no longer croaks if you try using back/forward now. I'm at work and don't want to take the time to look up the links, so (hopefully) free mod points to whoever feels like posting some links to this stuff!!
That being said, the article is garbage. People ARE integrating it into the browser controls... no point in using this crappy method. Fact is, most users will, through force of habit, use the back/forward buttons, or mouse gestures, or keyboard shortcuts.
Back Button Not a Problem (Score:5, Insightful)
A major challenge of Asynchronous JavaScript and XML (Ajax)-driven Web sites is the lack of a Back button
So says you. I say: if it makes sense for a user to hit your back button, why are you using Ajax? Do users hit their back button when they're using native desktop applications? Sounds to me like you're just to ajax-ify a traditional web application for the heluvit.
Re:Back Button Not a Problem (Score:4, Insightful)
I don't track too many AJAXy sites, but I should think anything where you can have a significant
change in scope of the content presented (particularly when it makes up the bulk of the page and
there is little else in the way of controls or context) ought to allow the user to go back to a
previous scope. Mail box to mail box, browsing a nested discussion.
Re:Back Button Not a Problem (Score:2, Insightful)