Hi,

I'm trying to use $.ajax function to poll my server for updates.
Here's the brief code that I use:

$.ajax({
        url: "endpoint",
        type: "POST",
        data: {action : "poll"},
        dataType: "json",
        cache: false,
        beforeSend: function() {  },
        success: function(resp) {alert("GOT IT");}
});

This way the success function is never called. I've checked with
firebug net console: all server responses do come back to the browser.

Once I remove

cache:  false

line, all works fine.

Could someone please explain me what am I doing wrong? Thanks in
advance.

Regards,
Juriy

Reply via email to