Somebody knows if the "There are new answers" notifications appearing at the top of the page while answering a question are retrieved using periodic polling or making use of some kind of comet/long-polling solution?

migrated from stackoverflow.com Aug 12 '10 at 1:45

This question came from our site for professional and enthusiast programmers.

  • I haven't tried, but I suspect it's periodic polling. You could fire up Fiddler or some similar tool to monitor requests and find out. – You Aug 8 '10 at 23:49
  • 3
    IMO, this should have stayed on SO. – Jon Seigel Aug 12 '10 at 17:34
  • @Jon Seigel, I would agree – James Aug 12 '10 at 17:37
  • @Jon: Do we have the vote option "belongs to SO" on meta? (I don't have enough rep here to see). – Daniel Vassallo Aug 17 '10 at 6:37
  • 2
    Sadly, no, there's no way for anyone without direct database access to migrate questions out of Meta. @Daniel Vassallo – mmyers Aug 17 '10 at 15:38

Yes, it is traditional polling every x seconds. You can see it in action, using Firebug:

New Answers on Stack Overflow http://img101.imageshack.us/img101/7573/firebugnewans.png

  • +1 for acting like a real web dev ;-) – delnan Aug 8 '10 at 23:52
  • Count: 0 seems redundant is Result is false. Go micro-optimizations! – Anurag Aug 9 '10 at 2:45

I imagine it is some kind of timestamps, the one that was get at the time you entered the question page... and the one of the new answer of that question... maybe there is kind of interval function execution (maybe 30 seconds) asking if there are question with a timestamp that is newest that your timestamp... if so, and you click "load new answers" the timestamp updates and the question are loaded and the loop continues...

You must log in to answer this question.