Php Ajax无限滚动和分页错误

Php Ajax无限滚动和分页错误,php,jquery,ajax,url,Php,Jquery,Ajax,Url,我的ajax无限滚动有问题,浏览器中的“后退”按钮会将我返回到页面的上一个加载部分。如何使其返回到上一页 $(document).ready(function() { // Infinite Ajax Scroll configuration jQuery.ias({ container : '.wrap', // main container where data goes to append item: '.item', // single i

我的ajax无限滚动有问题,浏览器中的“后退”按钮会将我返回到页面的上一个加载部分。如何使其返回到上一页

$(document).ready(function() {
    // Infinite Ajax Scroll configuration
    jQuery.ias({
        container : '.wrap', // main container where data goes to append
        item: '.item', // single items
        pagination: '.nav', // page navigation
        next: '.nav a', // next page selector
        loader: '<img src="css/ajax-loader.gif"/>', // loading gif
        triggerPageThreshold: 3 // show load more if scroll more than this
    });
});
$(文档).ready(函数(){
//无限Ajax滚动配置
jQuery.ias({
容器:'.wrap',//将数据附加到的主容器
项:'.item',//单个项
分页:'.nav',//页面导航
下一页:'.nav a',//下一页选择器
加载程序:“”,//正在加载gif
triggerPageThreshold:3//如果滚动次数超过此值,则显示加载次数
});
});
这是导航:

<?php if (isset($next)): ?>
    <div class="nav">
        <a href='index.php?p=<?php echo $next?>'>Next</a>
    </div>
<?php endif; ?>

现在我应该使用Rewrite,因为它为我的url添加了一个新值,还是有其他解决方案

代码来自此页面:

如果您使用的是该版本,那么只需禁用分页和历史插件即可。如果您使用的是该版本,那么在默认值列表中,您会注意到一个历史记录条目:

e.ias.defaults={
容器:“#容器”,
滚动容器:e(窗口),
项目:“.item”,
分页:“分页”,
下一步:“.next”,
左:!1,
加载程序:“”,
装货时间:600,
触发页面阈值:3,
触发器:“加载更多项目”,
阈值边距:0,
历史记录:!0,
onPageChange:function(){},
beforePageChange:函数(){},
onLoadItems:function(){},
onRenderComplete:function(){},
customLoaderProc:!1,
customTriggerProc:!1

只要将其值更改为
history:0;
,您就会没事。

我尝试将history:0;添加到w3bees版本,但是没有应用任何更改。或者,不能通过在Chrome中编辑源代码直接添加此更改吗?如果在Chrome DevTools中执行此操作,则为时已晚。所有内容都已初始化。请尝试在本地副本上执行此操作然后刷新页面。我将尝试这样做:)谢谢
e.ias.defaults = {
        container: "#container",
        scrollContainer: e(window),
        item: ".item",
        pagination: "#pagination",
        next: ".next",
        noneleft: !1,
        loader: '<img src="images/loader.gif"/>',
        loaderDelay: 600,
        triggerPageThreshold: 3,
        trigger: "Load more items",
        thresholdMargin: 0,
        history: !0,
        onPageChange: function() {},
        beforePageChange: function() {},
        onLoadItems: function() {},
        onRenderComplete: function() {},
        customLoaderProc: !1,
        customTriggerProc: !1