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


<html>
<head>

<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">

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

</body>
</html>


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

4 comments:

Radha Sai said...

nice post. Useful for freshers UI online course Bangalore

srjwebsolutions said...

We are leading responsive website designing and development company in Noida.
We are offering mobile friendly responsive website designing, website development, e-commerce website, seo service and sem services in Noida.

Responsive Website Designing Company in Noida
Website Designing Company in Noida
SEO Services in Noida
SMO Services in Noida

Vikas Chaudhary said...

Battery Mantra is Authorized exide car battery dealer in Noida and Greater Noida. We are providing our service in Indirapuram, Delhi, Ashok Nagar.

Exide Battery Dealer in Noida
Battery Dealer in Noida
Authorized Battery Dealer in Noida
Car Battery Dealer in Noida
Car Battery Dealer
Exide Battery Dealer

EG MEDI said...

Egmedi.com is online medical store pharmacy in laxmi nagar Delhi. You can Order prescription/OTC medicines online.
Cash on Delivery available. Free Home Delivery


Online Pharmacy in Delhi
Buy Online medicine in Delhi
Online Pharmacy in laxmi nagar
Buy Online medicine in laxmi nagar
Onine Medical Store in Delhi
Online Medical store in laxmi nagar
Online medicine store in delhi
online medicine store in laxmi nagar
Purchase Medicine Online
Online Pharmacy India
Online Medical Store