You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Detect redirects made through the HTTP Refresh response header #1697
A page can redirect with a Refresh: 0; url=... response header. It behaves like a meta refresh: the browser loads the page and then moves on, search engines treat it as a weaker signal than a 301, and people using assistive technology lose their place. a11y/meta-refresh only reads the <meta http-equiv="refresh"> tag, so a refresh sent as a header is not reported anywhere.
Proposal
Report a Refresh response header the same way the meta tag is reported today, in a11y/meta-refresh.
Acceptance Criteria
A page served with Refresh: 0; url=<other URL> is reported, and the finding names the header and the target URL.
A Refresh header with a delay and a target is reported with the delay shown.
A Refresh header with no URL (a timed reload of the same page) is reported as a reload, not a redirect.
The header name is matched in any letter case.
A page with both the header and the meta tag produces one finding that names both sources.
Pages with neither get the same result as before this change.
The solution text recommends a 301 or 308 redirect.
The docs page for a11y/meta-refresh describes the header case.
Activity
feat(rules): a11y/meta-refresh reports the Refresh response header #1697