Using META tag in HTML for setting response headers

As per Useful HTML META tags, HTML developer should be able to set the HTTP response headers by adding META tag in the HTML like this



<title>Caching test - second.html</title>
<a href='/perf/first.html'>Second HTML</a><br/>
<img src='/perf/images/cachesample.gif'/>


But we should never rely on this technique to set tag i tried serving this HTML from Apache Http Server as well as IBM's WebSphere Application Server and they dont set the response headers. Some of the browsers read the value of META tag and honor those values but its not very consistent.

The way it works is the HTML developer will generate these tags inside the document and then the server is supposed to read the HTMl response and parse it to find META tag's if it does then it is supposed to set corresponding HTTP headers but this adds performance penalty so its not guaranteed that every HTTP server will do that

No comments: