Skip to content

Comment on Ask HN: How do you do realtime

Comments

Well, the idea behind "realtime" as it pertains to Twitter is that it is about events happening that minute. While your page might not be refreshed immediately to see new information, you COULD refresh it yourself to view it. That's real time, versus something like a blog (except a live blog of course) where the information is not time sensitive or about something that happened that second.

Pages like Twitter or Gmail use AJAX to retrieve new information from a server without refreshing your whole page. Twitter does do this (or did, at least when viewing search results and it would tell you how many new results there have been since the last page refresh). The polling here I assume happens in a simple loop that probably iterates every set number of seconds.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.