【发布时间】:2012-03-19 14:32:40
【问题描述】:
当用户滚动到页面底部时,我正在使用 Jquery Ajax 将更多内容加载到我的页面,如下所示:
$(window).scroll(function(){
if($(window).scrollTop() == $(document).height() - $(window).height()){
$.ajax({
url: /* my url goes here */,
cache: true,
success: function(html){ /*append html to the bottom of page*/ }
});
}
});
问题是:当用户按下我页面中的某个链接然后按下后退按钮时,之前加载的新内容消失了。如何保留新内容?提前致谢。
【问题讨论】:
标签: jquery ajax caching back-button