Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6967137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:16:56+00:00 2026-05-27T16:16:56+00:00

How does facebook take care of their real-time data? if you’re viewing your activity

  • 0

How does facebook take care of their “real-time” data? if you’re viewing your activity feed and a user likes something, you can instantly see a change of text saying that that user liked it, or when you’re notified, you’ll see a red notification sign while on the page without refreshing.

I know that this code can push data without refreshing:

$.post('ajax/test.html', function(data) {
  $('.result').html(data);
});

But can someone explain how to push real-time data so other users will be able to see updates while on their page without refreshing.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:16:57+00:00Added an answer on May 27, 2026 at 4:16 pm

    This can be implemented using various techniques, which have many names: Long-polling, Server Sent Events, Comet, WebSockets, and others.

    Basic idea is this:

    • Alice opens facebook. Her browser makes a request for updates ($.get, for example), but the server does not respond if there are no new updates and the request remains in ‘waiting’ state.

    • Bob opens facebook. He decides to comment on Alice’s wall. His browser posts his comment to the server ($.post).

      • The server accepts this post, handles it properly (saves onto Alice’s wall, etc)
      • But ALSO server checks if there is a waiting update request from Alice. If there is, server renders info about this update into response stream and closes the connection.
    • Alice’s browser finally gets a response to this long hanging request and happily draws a red “1” in the notification area. It also immediately opens another update request (to not miss any).

    • Alice sees comment from Bob, which was delivered instantly.

    The technique described is called “long polling” and it was first introduced by Google in Gmail.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does Facebook provide a URL the user can access that will take him to
Does their API allow my Facebook-connected user to add a friend?
Does Facebook provide access to any real time APIs so that you can respond
How does Facebook structure their data for messages. I have heard they use Cassandra
Facebook does not allow callbacks on ip addresses. So how does one test their
Does anybody know how did Facebook do that "time ago". I'm trying to do
Does facebook changes user's id? Is there any possibility of change in the id
How does Facebook and other image intensive sites maintain a thumbnail size of the
Similar to what Facebook does on its newsfeed, I want to allow commenting on
I guess this is similar to what Facebook does, but...I haven't worked out how

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.