Skip to content

meta-refresh

Reports <meta http-equiv="refresh"> with a delay (content="5"). A delay of 0 is not reported.

A page that reloads or redirects by itself after a time takes the control from the user, disorients screen reader users and cannot be paused.

To fix, redirect on the server, or use a 0 delay; for a reload, give the user a button.

Reported
...
<html lang="en">
<head>
...
<meta http-equiv="refresh" content="5">
<meta http-equiv="refresh" content="0; url=/new">
</head>
<body>
...
angular:
lint:
rules:
meta-refresh: warn # off (default), warn, error
html:
lint:
rules:
meta-refresh: warn # off (default), warn, error
svelte:
lint:
rules:
meta-refresh: warn # off (default), warn, error
vue:
lint:
rules:
meta-refresh: warn # off (default), warn, error

Enabled by the presets: html/html-validate-recommended.

Suppress one line with sudsy-disable-next-line meta-refresh in a comment of the file’s language.

The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.

Tool Rule Match What differs
html-validate meta-refresh partial a delay is any content that starts with a nonzero digit; no allowLongDelay option