Can you use a story API, not a hashbang approach?
- It allows you to manipulate the URL displayed to the user.
- This means that back / forward work reasonably.
- Page bookmarking works reasonably.
- This is better in terms of performance because if the user refreshes the page (or gets a link to the page from an external source), the correct content is loaded for the first time, instead of loading a blank page and then capturing the correct content through AJAX.
The downside is that older browsers do not support it. You can opt out of the hashbang approach (if you really need to). I do not know any existing structures that do this. I would rather opt out of dynamically loading content (i.e. reloading a full page when a user clicks a link). The story API will be increasingly supported, so this "problem" will decrease over time.
Here's a working example with some documentation. From the address bar, you can see that the pages load the “old school” (full page refresh), but if you look at the console (Firebug, Chrome dev tools), you will see that the content is captured through an AJAX request.
Mozilla has several docs about this.
Spycho Jun 13 '11 at 12:22 2011-06-13 12:22
source share