Is monitoring location.hash a solution for history in XHR apps?

前端 未结 3 1189
天涯浪人
天涯浪人 2020-12-05 05:12

As is well known, in XHR (aka AJAX) web applications no history for your app is build and clicking the refresh button often moves the user out of his/her current activity. I

3条回答
  •  無奈伤痛
    2020-12-05 05:50

    All that stuff is important for supporting the full range of browsers, but hopefully the need for it will go away. IE8 and FF3.6 both introduced support for onhashchange. I imagine that others will follow suit. It would be a good idea to check for the availability of this functionality before using timeouts or iframes, as it is really the nicest solution currently out there - and it even works in IE!

提交回复
热议问题