Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

This question already has an answer here:

Content on the StackOverflow website often updates without refreshing the screen.

I understand it is using Ajax, so I break out my handy Firebug, and look for the GET requests on the console but there are none (other than asking for similar questions or autosave).

The timer can maybe be just a clock running on the client, but I have seen other updates such as when a new post has been added.

How do they do this?

share|improve this question

migrated from Apr 2 '13 at 15:09

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

marked as duplicate by casperOne Apr 2 '13 at 15:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 24 down vote accepted

By using websockets. In simple words, they keep a websocket connection open when you open a page and do all session data transport via it. If it cannot open/reopen the websocket connection, they resort to using the XmlHttp based AJAX (haven't checked)

I believe they do have a normal XHR based AJAX fallback option (haven't checked). Just that if your browser fully supports websockets, you'll never see the normal HTTP requests.

share|improve this answer
Sweet! Websockets. I definitely need to read up on that! – user1032531 Feb 20 '13 at 15:09

enter image description here

As the guy above said, Stackoverflow uses websockets, you can see in the screenshot of the same page, they have sockets for likes on question, answers, reputation everything..

Websocket is a duplex connection protocol, as HTTP is single side only, client asks server responds, but with technologies like websocket, you get an option to send data from server to client also whenever some event happens on server..

share|improve this answer

Not the answer you're looking for? Browse other questions tagged .