HTML HTTP Equivalents and Their Limits
What http-equiv means
Some predefined meta http-equiv values instruct the browser during document processing. This is not a general mechanism for manufacturing arbitrary HTTP response headers. Prefer the modern charset declaration over the legacy content-type syntax.
<!doctype html><html lang="en"> <head> <title>Metadata practice</title> <meta charset="utf-8"> </head> <body> <p>Modern encoding declaration</p> </body></html>The document uses charset, not a simulated server header.
Refresh is a timed navigation
A refresh directive can reload a page or navigate after a delay. Automatic movement can interrupt readers. Prefer ordinary links or server redirects where appropriate. This static example has no refresh directive so nothing navigates.
<!doctype html><html lang="en"> <head> <meta charset="utf-8"> <title>Metadata practice</title> <!-- Avoid automatic refresh: meta http-equiv="refresh" content="5; url=/next" --> </head> <body> <a href="/next">Continue when ready</a> </body></html>The learner chooses when to follow the link. The example is not a redirect test.
Content Security Policy boundaries
CSP restricts resource loading. A meta CSP can apply to content processed after the declaration but cannot deliver every directive available in a response header (for example frame-ancestors is not supported in meta). Real deployments need a tailored policy; the following local policy merely blocks images.
<!doctype html><html lang="en"> <head> <meta charset="utf-8"> <title>Metadata practice</title> <meta http-equiv="Content-Security-Policy" content="img-src 'none'"> </head> <body> <p>Text remains available.</p> </body></html>The policy declaration is present. It is not a complete production policy.
Common mistakes and practice
Use actual HTTP response headers for security policies where possible. Meta cannot substitute for authorization, cookies, status codes or arbitrary headers. Do not deploy demonstration CSP unchanged.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
HTML HTTP Equivalents and Their Limits — Knowledge Check
Apply the metadata concepts taught in this lesson.
Can http-equiv create any HTTP response header?
What does refresh potentially do?
Why prefer a user-operated link in this example?
Which CSP directive is unavailable in meta?
Which approach is preferable for a production CSP?