Created
February 14, 2015 16:37
-
-
Save slick2/f399676606e21355ddab to your computer and use it in GitHub Desktop.
Traditional Long Poll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function poll() { | |
setTimeout(function() { | |
$.ajax({ | |
url: '/magento_ajax_import_status', | |
type: 'GET', | |
success: function(data) { | |
obj.setValue(data.value); | |
}, | |
dataType: "json", complete: poll } | |
); | |
}, 30000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment