Questions tagged [long-polling]

In web programming, long-polling is an emulation of pushing data, implemented by repeated polling with delayed response.

Long polling is itself not a true push; long polling is a variation of the traditional polling technique, but it allows emulating a push mechanism under circumstances where a real push is not possible, such as sites with security policies that require rejection of incoming HTTP/S Requests.

1067 questions
1097
votes
4 answers

What are Long-Polling, Websockets, Server-Sent Events (SSE) and Comet?

I have tried reading some articles, but I am not very clear on the concepts yet. Would someone like to take a shot at explaining to me what these technologies are: Long Polling Server-Sent Events Websockets Comet One thing that I came across every…
user1437328
  • 14,226
  • 9
  • 29
  • 40
96
votes
1 answer

Differences between websockets and long polling for turn based game server

I am writing a server for an iOS game. The game is turn based and the only time the server needs to push information to the client is to notify of the opponent's move. I am curious if anyone could comment on the performance and ease of…
acidic
  • 1,267
  • 1
  • 17
  • 23
79
votes
6 answers

jQuery read AJAX stream incrementally?

I have read this question but it doesn't exactly answer my question. Unfortunately, it looks like things have changed in in the XHR object since I last looked at AJAX, so it is no longer possible to directly access responseText before it is finished…
Josh
  • 3,854
  • 7
  • 31
  • 40
79
votes
2 answers

Disable ajaxStart() and ajaxStop() for a specific request

I am using .ajaxStart() and .ajaxStop() to show a modal while an ajax request is being made. (between start and stop) Now I'd like to add a longpoll function that keeps waiting for notifications, similar to the one on the left upper corner of this…
Gung Foo
  • 12,626
  • 5
  • 29
  • 39
74
votes
3 answers

Short-polling vs Long-polling for real time web applications?

I'm building a real-time web application As far as I know, the most popular choices are short-polling and long-polling. What are the advantages and disadvantages might there be for measuring one over the other?
Jeff
  • 12,063
  • 8
  • 28
  • 30
52
votes
3 answers

Chrome stalls when making multiple requests to same resource?

I'm trying to implement long polling for the first time, and I'm using XMLHttpRequest objects to do it. So far, I've been successful at getting events in Firefox and Internet Explorer 11, but Chrome strangely is the odd one out this time. I can load…
fluggo
  • 1,478
  • 2
  • 13
  • 21
45
votes
1 answer

What technology does Google Drive use to get real-time updates?

What technology does Google Drive use to do real-time? When I type in a Google Drive document that is being accessed by multiple users, the Chrome Developer Tools Network tab shows that there are no WebSockets. I see that the two most frequent types…
Max Heiber
  • 10,336
  • 4
  • 47
  • 67
39
votes
3 answers

What is a RESTful way of monitoring a REST resource for changes?

If there is a REST resource that I want to monitor for changes or modifications from other clients, what is the best (and most RESTful) way of doing so? One idea I've had for doing so is by providing specific resources that will keep the connection…
Ross
  • 8,968
  • 8
  • 33
  • 35
33
votes
5 answers

How does a WCF server inform a WCF client about changes? (Better solution then simple polling, e.g. Comet or long polling)

see also "WCF push to client through firewall" I need to have a WCF client that connect to a WCF server, then when some of the data changes on the server the clients need to update its display. As there is likely to be a firewall between the…
Ian Ringrose
  • 49,271
  • 50
  • 203
  • 302
31
votes
4 answers

Chrome's loading indicator keeps spinning during XMLHttpRequest

I'm writing an AJAX web app that uses Comet/Long Polling to keep the web page up to date, and I noticed in Chrome, it treats the page as if it's always loading (icon for the tab keeps spinning). I thought this was normal for Google Chrome + Ajax…
Martin Konecny
  • 50,691
  • 18
  • 119
  • 145
30
votes
2 answers

Non-Message Queue / Simple Long-Polling in Python (and Flask)

I am looking for a simple (i.e., not one that requires me to setup a separate server to handle a messaging queue) way to do long-polling for a small web-interface that runs calculations and produces a graph. This is what my web-interface needs to…
aaronlevin
  • 1,393
  • 2
  • 12
  • 18
26
votes
6 answers

How to determine server disconnection from SignalR client?

The question is how can SignalR JavaScript client detect when connection with server is lost? Thanks for any reply!
Alexandr
  • 666
  • 2
  • 9
  • 18
22
votes
1 answer

How to do long-polling AJAX requests in ASP.NET MVC?

Does anyone know how to code up long-polling AJAX requests (for server PUSH notifications) in ASP.NET MVC? Whenever I do it, it seems that only the last browser to open up a window gets the notifications. As if IIS/ASP.NET were canceling the last…
Andrew Arnott
  • 74,820
  • 24
  • 127
  • 163
21
votes
1 answer

polling vs long polling

I got onto these examples showing polling vs long-polling in javascript, however I do not understand how they differ from one another. Especially regarding the long polling example, how does it keep its connection open? This is what the traditional…
Renaud
  • 4,193
  • 7
  • 36
  • 61
20
votes
4 answers

Asp.net session never expires when using SignalR and transport mode long polling

We have a web application that uses SignalR for its notification mechanism.The problem is when we are browsing our web application using IE ,SignalR uses Long Polling as its transport type thus sends back requests to our web server therefore Session…
Beatles1692
  • 4,814
  • 27
  • 60
1
2 3
71 72