I have a question regarding back button functionality in an "ajaxy" web application.
Here is the scenario:
My initial theory for this was to use the "Really Simple History" framework, however, I have spent a fruitless morning trying to make it work, and even then it is a hack at best.
Currently, what I could like to do is update window.location .pathname. This would then allow some simple mod_rewrite rules so that if the page was loaded it could be sent values in the 'search' portion of the string.
(to clarify, suppose the user bookmarked http://domain.com/app/foo/bar/ this could then load http://domain.com/app/app.php?1=foo&2 =bar)
Furthermore, while I can handle immediate back and forward with a cookie or some other local data store, I would ideally like to be able to simply push new locations onto the history stack.
Naturally, I have searched throughly around the 'usual places' and not found an answer to this question, so I doubt it is as easy as I want it to be, but any more or less working solution (even one without 'pretty links') would be more than welcome at this point.
~ Christopher
Here is the scenario:
- The user navigates to a page http://domain.com/app/.
- Since app/index.php file contains [PHP]include['app.php'][/PHP] this really serves to load app/app.php which is the "ajaxy" application
- The user loads data and otherwise "does stuff" with app.php
- At some point, the user reaches a page they would like to be able to send to a friend/coworker/bookmarks service
- At some point the user clicks the back button in their browser and is taken to the previous state of the application.
My initial theory for this was to use the "Really Simple History" framework, however, I have spent a fruitless morning trying to make it work, and even then it is a hack at best.
Currently, what I could like to do is update window.location .pathname. This would then allow some simple mod_rewrite rules so that if the page was loaded it could be sent values in the 'search' portion of the string.
(to clarify, suppose the user bookmarked http://domain.com/app/foo/bar/ this could then load http://domain.com/app/app.php?1=foo&2 =bar)
Furthermore, while I can handle immediate back and forward with a cookie or some other local data store, I would ideally like to be able to simply push new locations onto the history stack.
Naturally, I have searched throughly around the 'usual places' and not found an answer to this question, so I doubt it is as easy as I want it to be, but any more or less working solution (even one without 'pretty links') would be more than welcome at this point.
~ Christopher
Comment