Skip to content

Instantly share code, notes, and snippets.


James Ngugi ngugijames

Block or report user

Report or block ngugijames

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
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.