Wirebook

Wirebook › Glossary › Polling

What is polling?

In one sentence: Asking again and again on a timer whether anything has changed, like checking the letterbox every hour.

A little more

Polling means a program asks the same question on a timer: has anything changed? A news reader polls a feed every hour, an email app might check every few minutes, and a script might poll a web address until a job is finished.

Polling is simple and private, because the website doesn't need to know who is asking, but it has a built-in trade-off: poll often and most checks come back empty; poll rarely and news waits. Cheap replies such as 304 Not Modified keep frequent polling affordable. Long polling is a variation where the server holds the question open until there's an answer.

See it in action

  1. BonusDoes the app keep peeking, or does the website ring a doorbell?How does a news app know a new lesson appeared? Race a peeker, a messenger who waits at the door and a doorbell through a pretend day, count the wasted trips, be the peeker yourself, and peek at this site's real feed to see a 304 Not Modified.6 min · interactive

Related words

← All 146 words