如果您查看Foursquares网页:https://foursquare.com/
他们在不刷新页面的情况下自动进入新的Feed。我正在建立一个后端,我们可以看看用户的speciefic feed。我怎么能得到Foursquare使用的相同效果?
答案 0 :(得分:1)
这是setInterval
和他们的ajax调用的混合。
setInterval(1000, function() {
// Make ajax call here to get more information and append new elements to the DOM.
});
答案 1 :(得分:1)
以下是对AJAX的一个很好的介绍: