Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-24-2012, 06:13 AM   PM User | #1
shaunthomson
New Coder

 
Join Date: May 2012
Posts: 88
Thanks: 51
Thanked 0 Times in 0 Posts
shaunthomson is an unknown quantity at this point
How does Facebook check for message updates?

Gidday

I'm building a basic messaging system, and am currently checking for a user's message updates by querying the database every few seconds (running a php 'check' page initiated every 3 seconds using AJAX.

It works fine, but I'm curious as to how Facebook do it?

I notice two things...

1. If you load Facebook into your browser, typically there's no traffic unless something happens ie they aren't using AJAX to repetitively ping the database

2. When someone sends you a message, it instantly appears, and the speech bubble up top updates with the number of new messages - both without a page refresh.

Any ideas as to how are they doing this?

Thanks guys
shaunthomson is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:43 PM.


Advertisement
Log in to turn off these ads.