Making Browser Back button work while using AJAX requests

前端 未结 2 717
死守一世寂寞
死守一世寂寞 2020-12-16 08:35

I am writing a web application which retrieves a lot of data using AJAX which substantially modifies the loaded page depending on what button the user clicked (Let\'s say th

相关标签:
2条回答
  • 2020-12-16 09:01

    Take some time to go through some. of. the. previous. questions. on. this. topic.

    Hint: use the hash man! (window.location.hash that is)

    0 讨论(0)
  • 2020-12-16 09:02

    You will have to use # capabilities of your URL to store your intermediate Ajax requests in browser history. If you use any Javascript library there will probably be a solution in the library itself or in a form of a community extension/plugin.

    For instance there's a plugin for jQuery here.

    Google for browser history ajax

    0 讨论(0)
提交回复
热议问题