Skip to content

Instantly share code, notes, and snippets.


James Ngugi ngugijames

View GitHub Profile
ngugijames / longPolling.js
Created Oct 28, 2015 — forked from jasdeepkhalsa/longPolling.js
Simple Long Polling Example with JavaScript and jQuery by Tian Davis (@tiandavis) from (
View longPolling.js
// Long Polling (Recommened Technique - Creates An Open Connection To Server ∴ Fast)
(function poll(){
$.ajax({ url: "server", success: function(data){
//Update your dashboard gauge
}, dataType: "json", complete: poll, timeout: 30000 });
You can’t perform that action at this time.