Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-02-26 01:48:19

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Unnecessary meta tag

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

isn’t needed in any of the page templates, since it’s already sent via header() in publish.php.

Offline

#2 2008-02-26 09:56:47

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Unnecessary meta tag

W3C recommends using that meta tag when XHTML is served as HTML.

Offline

#3 2008-02-26 10:36:58

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Unnecessary meta tag

Does the W3C backup “always use a <meta> element” on their site? I haven’t found any reasoning (commandments be damned! :P). From this page, it only lists two advantages, neither of which really applies to TXP:


*An in-document encoding allows the document to be read correctly when not on a server. This applies not only to static documents read from disk or CD, but also dynamic documents that are saved by the reader.

  • An in-document declaration of this kind helps developers, testers, or translation production managers who want to perform a visual check of a document.

If you look at the precedence rules, headers are first:


  1. HTTP Content-Type
  2. XML declaration
  3. meta charset declaration
  4. link charset attribute

Last edited by jm (2008-02-26 10:37:20)

Offline

#4 2008-02-26 11:15:18

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Unnecessary meta tag

I think the first advantage does apply, but people who don’t need it, can remove the meta tag.

Offline

Board footer

Powered by FluxBB