KPO
KPO

Reputation: 880

How to get new content on the page, without a page refresh

If you look at Foursquares webpage : https://foursquare.com/

They have the new feeds automatically coming in without refreshing the page. I am building a backend where we can look at user speciefic feeds. How can i do get the same effect that Foursquare is using?

Upvotes: 0

Views: 186

Answers (2)

user185320
user185320

Reputation: 103

Here is a pretty good introduction to AJAX:

http://www.w3schools.com/ajax/default.asp

Upvotes: 1

Matthew Abbott
Matthew Abbott

Reputation: 61589

It's a mix of setInterval and their ajax call.

setInterval(1000, function() {
    // Make ajax call here to get more information and append new elements to the DOM.
});

Upvotes: 1

Related Questions