Home

revalidate

Revalidate refers to the act of validating something again to confirm its correctness, currency, or authenticity. In computing, revalidation commonly occurs after an initial validation to ensure data or resources remain accurate. The term appears in contexts such as caching, content delivery, authentication, and form or data validation.

In HTTP caching, revalidation enables a cache to verify a stored response with the origin server before

In Next.js, revalidate is used in Incremental Static Regeneration. It specifies a time interval, in seconds,

Revalidation also occurs in authentication and session management, where a token or session may be re-validated

Benefits of revalidation include fresher data and reduced bandwidth compared to full rebuilds. Potential drawbacks include

reuse.
The
cache
issues
a
conditional
request
using
validators
like
ETag
or
Last-Modified.
If
the
origin
reports
that
the
resource
is
unchanged,
the
server
responds
with
304
Not
Modified
and
the
cached
copy
is
used;
otherwise
a
fresh
representation
is
returned
and
stored.
after
which
a
statically
generated
page
is
considered
stale.
On
the
next
request
after
the
interval,
the
server
regenerates
that
page
and
serves
the
updated
content,
while
still
delivering
the
old
cached
page
until
regeneration
completes.
against
an
issuer
or
database.
This
can
involve
refreshing
tokens
or
rotating
credentials
to
maintain
security
and
access
controls.
stale
data
if
revalidation
is
too
infrequent,
or
excessive
validation
overhead.
Effective
strategies
balance
data
freshness,
latency,
and
resource
use.