How to check for new entries periodically from the front-end?
This is actually a pretty simple task.


Create a template that your JS will reach out to returning the total number of entries. First create a template folder called "ajax" with an index.html file inside. Within that file put (replacing blogs with the name of your channel):


{{ craft.entries.section("blogs") | length }}


Inside your javascript, add this:

    var numberOfEntries = false;

    setInterval(function(){

    $.ajax({
      url: '/ajax',
      type: 'GET',
    })
    .success(function(data) {

      updatedNumberOfEntries = Number(data);

      if(updatedNumberOfEntries != numberOfEntries){

        // something was updated -- do whatever you want
        numberOfEntries = updatedNumberOfEntries;

      }
    });

    }, 5000);



You'll obviously need to make some revision to suit whatever you're trying to do but essentially just dump out the number of articles in a template, and use jquery's ajax method to get that value and see if it has changed.