Facebook image viewer Ajax history - how they do that?
- in facebook photo.php script when we click on picture or next or previous picture button, it use ajax to move to next and prvious picture using ajax without page reload.
- when i click even on back button of brower in facebook it use ajax again to load previous picture instead load previous page....
- what's my problem, when i click on back button of browser in my code, control goes to my previous page instead of previous picture in div tag ...
- i know there is some change in Address bar URL in facebook when we click on next and 开发者_如何学编程previous button in facebook ... how facebook is doing that
Either the hashbang technique or pushState
You can use the hash mark trick (#). Here is a reference: http://www.contentwithstyle.co.uk/content/fixing-the-back-button-and-enabling-bookmarking-for-ajax-apps http://ajaxonomy.com/2007/web-design/a-better-ajax-back-button-solution
精彩评论