2

Currently I am facing the ajax URL change problem.

Let's say I have an ajax call, when user click on the div and the div will expand and ajax get data from db but the url doesn't change.

Then I found about html5 history api at firefox website. At the bottom of the page recommend history.js to overcome cross-browser issues.

But then, I found jquery-history.js and jquery-ajaxy , Omg, why there is so much version?

Any suggestion which I have to use? What I want is all my ajax call

  • does provide url change
  • back / next browser button
  • Using HTML5 api
  • Don't Care about old browser
  • Don't Care IE
  • It is real no fully page reload but not just fake it.

And I am using jquery.

4

1 回答 1

1

如果您关心 URL和 noscript 客户端,那么只需创建一个非 AJAX 站点并使用jquery-pjax增强它。

如果您不在乎,则只需使用哈希。

于 2013-01-25T04:55:07.243 回答