Hacker Newsnew | comments | show | ask | jobs | submitlogin

In regards to "Goodbye to Back/Forward buttons", while the author is correct that browsers don't offer a good API to observe the back and forward buttons being invoked, there are at least two workarounds. One way is to poll window.location.hash via setInterval or whatnot. Another has something to do with a hidden iframe which can observe the back and forward buttons.

For example, SproutCore's routing system uses the first technique: http://docs.sproutcore.com/symbols/SC.routes.html

From the observer, the developer can then ensure the web app is in a state consistent with the hash part of the url, enabling the user to use the back and forward buttons within the app.




Really Simple History packages this in a library, and it will be introduced natively in HTML5.

-----




Applications are open for YC Summer 2015

Guidelines | FAQ | Support | Lists | Bookmarklet | DMCA | Y Combinator | Apply | Contact

Search: