Website change webhook or polling: which one your monitor needs
Polling spends requests. A webhook spends trust. The right answer depends on how often the page moves.
· 2 min read
A website change webhook is a push, and polling is a pull. Both answer the same question, and the difference shows up in cost, latency and how much code you keep.
Polling, in one paragraph
Your program fetches a page on a timer, compares the result with the last copy, and decides whether anything changed. It is easy to write and easy to reason about, because you control every step. It is also wasteful: most fetches find nothing, and the interval decides how late you learn.
A webhook, in one paragraph
You register an address once. When the service sees a change, it sends an HTTP request to that address with the details. There is no timer on your side, no stored copy and no comparison logic.
Side by side
| Question | Polling | Webhook |
|---|---|---|
| Who starts the request | You, on a schedule | The service, on an event |
| Latency | Up to one interval | As soon as the change is detected |
| Idle cost | One fetch per interval per page | Nothing between events |
| Failure you must handle | Missed runs, timeouts | Duplicate, delayed and out-of-order delivery |
| Where the diff lives | Your code | The service |
Neither column is free. Polling spends requests, webhooks spend trust.
Where a webhook earns its place
When the thing you watch changes rarely, polling is mostly waste. A regulator's notices page might change twice a month; a cron job checking it every five minutes is 8,600 fetches for two events.
A webhook inverts that. Nothing happens between events, and the event arrives once the service has decided the change is real.
That decision is the quiet value. A page that rotates a banner or refreshes a timestamp looks different on every fetch. A service that compares meaning rather than bytes can ignore those and tell you only when the substance moved.
What you must build for webhooks
Three habits make a receiver reliable.
Verify the signature. AyeWatch signs each delivery with X-AyeWatch-Signature, an HMAC-SHA256 digest of the raw body. Compare it in constant time before parsing.
Acknowledge before working. The service abandons a request after 10 seconds and retries a non-2xx with exponential backoff up to 10 attempts. Store, return 2xx, process from a queue.
Deduplicate on the update id. Deliveries can arrive out of order, so update_id belongs in a unique index and created_at decides the order. A retry is normal, a duplicate action is not.
Where polling still wins
If the page needs a session cookie, a specific header or a scraped layout that only you know how to read, you are already writing the fetch. Polling fits there. It also fits when the check is one line in a script that already runs on a schedule.
The mixed pattern
Many teams do both. A webhook carries the routine events, and a daily poll acts as a backstop that catches a missed delivery. The poll is cheap at that frequency and it turns an outage into a delay.
The practical answer
Use a webhook for pages that matter and change without warning. Use polling for a page you already fetch for another reason. Register one webhook address, route on the monitor id and keep the receiver boring.
AyeWatch delivers signed webhooks alongside push, email, Slack and Discord, with the API on paid plans from $9 a month, billed in monitoring credits, after a 7 day trial.