The http-equiv attribute on a <meta> element gives the browser a pragma — a document-level processing instruction similar to certain HTTP response headers. The matching value goes in content.
Only a subset of headers is supported (for example content-type, refresh, and content-security-policy). Prefer <meta charset> for encoding and real HTTP headers for production redirects and most security policies.
Baseline · Widely available.
Not experimental. The attribute itself is standard; some pragma names are obsolete or ignored (see values below).
Deprecated / ignored pragmas.
content-language is deprecated (use lang). set-cookie and x-ua-compatible are ignored by modern browsers.
Accessibility — meta refresh.
Short refresh intervals can interrupt screen reader users before they finish the page. Prefer server redirects, and keep any delay long enough to read.
Syntax
HTML Syntax
syntax.html
<meta http-equiv="pragma-name" content="value">
Place the tag in <head>. pragma-name selects the instruction; content supplies its parameters.
Values
Attribute Values
Supported and notable pragma names (case-insensitive in practice):
CSP is declared in the head. Open Try It Yourself to experiment; a strict policy can block scripts/styles.
How It Works
Name the pragma.Content-Security-Policy enables a page-level CSP.
Policy in content.default-src 'self' limits default resource loading to the same origin.
Test carefully. Strict policies can break inline scripts and third-party assets.
Production tip. Deliver CSP via the HTTP header when you can; do not invent other security headers through http-equiv.
Edge Cases & Pitfalls
Unrecognized pragmas are ignored — which can create a false sense of security.
security
Do not invent security headers in meta
MDN: do not set other security headers with <meta http-equiv>. Unsupported names are ignored.
deprecated
content-language is deprecated
Use the document lang attribute instead of a language pragma.
ignored
set-cookie and x-ua-compatible
Modern browsers ignore these pragmas. Use HTTP Set-Cookie and drop IE compatibility metas.
a11y
Refresh can trap users
Auto-reload or redirect too quickly fails WCAG timing expectations. Prefer links and server redirects.
charset
Prefer <meta charset>
Shorter, clearer, and equivalent for HTML. Keep content-type only when maintaining old documents.
Compatibility
Browser Support
http-equiv is an HTML attribute on meta in the browser. It is not a Node.js, Deno, or Bun API.
✓ Baseline · Widely available
http-equiv
Widely available since about July 2015. Individual pragmas differ: content-type, refresh, and CSP are useful; set-cookie and x-ua-compatible are ignored.
97%Global support (attribute)
Google ChromeAll
Full support
Mozilla FirefoxAll
Full support
Apple SafariAll
Full support
Microsoft EdgeAll
Full support
OperaAll
Full support
Samsung InternetAll
Full support
Internet ExplorerSupported (legacy pragmas)
Supported
http-equivWidely supported
Bottom line: Safe to use for documented pragmas. Prefer charset meta, HTTP redirects, and HTTP security headers when possible.
Prefer:<meta charset> and HTTP redirects/headers when you can.
Avoid: short refresh, ignored pragmas, fake security metas.
One line:http-equiv is a limited meta pragma list — not a full HTTP header API.
Frequently Asked Questions
On a meta element, http-equiv names a pragma (processing instruction) as if certain HTTP headers applied to the document. The content attribute holds the matching value.
Only the meta element in the document head. Pair it with content for the pragma value.
Prefer <meta charset="utf-8">. The legacy form is <meta http-equiv="content-type" content="text/html; charset=utf-8">, which is equivalent but longer.
Use with care. Short refresh intervals hurt accessibility. Prefer HTTP redirects (3xx) for real redirects, and give users enough time if you must refresh.
No. Only a subset is supported (such as content-type, refresh, and content-security-policy). Unrecognized values are ignored. Do not rely on meta for other security headers.
No. Browsers ignore set-cookie pragmas, and x-ua-compatible is obsolete for modern browsers. Use real HTTP headers or modern markup instead.