Push X Ajax X Reload

Asked

Viewed 17 times

0

Today I use this function to update data from a page without having to fully reload it

function fDashboardProgressao(tempo) {

    $.ajax({
        type: "GET",
        dataType: "json",
        url: '/relatorios/dados.dashboard.progressao.php',
        data: {}
        ,
        success: function (json, status) {
            $("#dados").html(json.dados);
        }
    });

    setTimeout("fDashboardProgressao(20000)", tempo);
}

fDashboardProgressao(20000); // Inicializa

I would like to optimize some process, because I have several of this type of function in the system, I know there is the PUSH system in the browsers, but this process has to have the approval of the user and I do not know if this function would fit in my case. Right here in Stack you have the icons to the right that change with the user’s status, as is done?

It’s client-side javascript or server push?

Type Uol CHAT that displays messages without reloading all pages, how is this done?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.