当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - location.hash is not changing to the previous hash on the first click of browser back button but only on second click

问题描述:

I have a backbone route application in which some page are loading through ajax,

my home page url is ending like 1)home.shtml, and i have account settings page and url is 2)settings.shtml#/account_settings, one more is 3)settings.shtml#/preferences

When i navigating from page 1 to 2 and click the back button everything is working fine.

but when i navigating form page 2 to 3 (which is loading through ajax call-no page reload) and click on back button the hash url is still #/preferences and page doesn't loading. but if i click one more time the hash is changing to #/account_settings and page is getting loaded.

分享给朋友:
您可能感兴趣的文章:
随机阅读: