Jump to content

Long polling


remenissions
 Share

Recommended Posts

To keep it simple I've searched all over google and these threads trying to find some tutorials on long polling. There's plenty of them too! The problem is I cannot seem to find any without frameworks like Jquery. Does anyone know of some guides or steps into turning a regular Ajax request into long polling without frameworks like Jquery?

Link to comment
Share on other sites

A long-poll request isn't any different from any other ajax request from the javascript side, the difference is on the server-side. What happens with a long-poll request is that your server-side will just wait until it has something to report rather than responding immediately (potentially with no data).

Link to comment
Share on other sites

If you are looking to long poll, I'd consider taking a look at node.js it could be just what you are looking for. It's not reliant on JQuery. We are using it on a project that is in development at the moment to provide the user with live notifications; It's reduced load massively as we no longer need to keep checking for new data, we can just feed the user the new data as it becomes available. I've also just googled "node.js long polling" and found this tutorial on long polling in node.js that may be of use.

Edited by AaronClifford
Link to comment
Share on other sites

This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.