Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Basically I would like to know how apps such as hotmail receive emails in realtime, without making periodic checks on the server - I've sent an email to myself from outlook with hotmail open and saw this in the console a couple of seconds later -

GET http://sn108w.snt108.mail.live.com/mail/messageshelper.mvc

the contents of which is the html to update, but I'd like to know what listens for the get request which presumably fires some javascript to update the dom?

My question isn't specific to hotmails methodolgy in fact far from it as they will be working on the .NET platform whereas my proficiencies (if you can call them that!) are in the LAMP stack but any reading material on the subject would be great, thanks!

share|improve this question

closed as off-topic by gnat, MichaelT, GlenH7, mattnz, Dan Pichelman Jun 27 at 14:15

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – gnat, MichaelT, GlenH7, mattnz, Dan Pichelman
If this question can be reworded to fit the rules in the help center, please edit the question.

I'm not asking for anything to be recommended? I'm asking for help in identifying a technology or methodology used - it's non-ambiguous and not open to opinionated answers, surely this falls outside the bounds of the reason it's been put on hold? –  Keir Lavelle Jun 28 at 9:31

2 Answers 2

up vote 4 down vote accepted

There are many many ways to achieve something like this.

  • You can use WebSockets - for real time communication.
  • You can use polls - 'ping' the server every N seconds asking if there has been a change and update accordingly.
  • Use long polling.
  • Use Comet implementation (very hard to do)
share|improve this answer
Thank you, after some brief reading WebSockets is exactly what I wanted –  Keir Lavelle Aug 14 '12 at 16:48

In modern browsers this is typically done with WebSockets. In older browsers it can be done with long polling.

I've read that WebSockets is what's used on this site for the live updating of lists, edits, reputation, etc.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.