Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

I was just looking at the meta tag in the <head> on Stack Overflow site and I do not see any reference to the Content-Type used?

Is there any difference between setting the http header information through the meta tag or directly setting it on the response? Any issues related to browser compatibility?

share|improve this question
reason for down vote? – user134608 Sep 20 '09 at 15:41
Looks like the downvote was for your flippant attitude in the first version. Good to see techzen's compliance with asking nicely. – random Sep 20 '09 at 15:42
up vote 10 down vote accepted

Why simulate HTTP headers with http-equiv when you can use HTTP headers directly?

share|improve this answer
Any possibility with of lack of compliance with older browsers? – user134608 Sep 20 '09 at 15:47
I was always under the impression that the http-equiv thing was a hack added to HTML to give you the ability to set this value even if you don't have the ability to modify the HTTP headers. Browsers are more likely to respect an HTTP header rather than an HTML hack to emulate that HTTP header. Not to mention that both have been around long enough that any browser newer than IE 4 probably supports both. – Graeme Perrow Sep 20 '09 at 20:17
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >

The W3C's Internationalization and Localisation (L18n) Body recommends setting the header with an apache .htaccess file. It's always the case the the header will supersedes any information found within the content, http-equiv is meant to be used as a fall back last resort. This is how it has been implemented. However as I understand it, it would seem that http-equiv was meant to be used as the last word on how the content was to be displayed to the user.

W3C's L18n does have a recommendation on what type of tag to use and when.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .