Repeatedly polling server with ajax

I’ve made a small fiddle that illustrates repeatedly polling a server asynchronously once every second with the ability to pause and resume for posterity. For more advanced functionality, including long-polling then SignalR is your man, but for something simple this does the job.

The code is also reproduced here:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s