This, that and the other (may contain nuts)

    Content encoding information within HTML or XHTML markup

    Steve Castledine  16 June 2008 16:25:25
    Its a question I ponder over a lot at the minute, do I actually need to include the content encoding information inside my html? (eg meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1").

    Generally a web server includes the content encoding information in the http header when serving up web pages. For whatever reasons (I think stemming back to getting html to 100% pass the html/xhtml validator test's) I have tended to also include the encoding information in my html. This can cause problems when your html then is based on a server that is telling the browser something different.

    I am wondering whether excluding this encoding from html, and maybe more importantly XHTML is ok, even though the validator's squeal warnings at you? Am I just getting my character sets mixed up with my content encoding? (I just wanna code!).

    Any thoughts? What's the best practice here - especially when dealing with software that has to run on multiple language platforms?

    A sub question for those running Domino servers that are not English. Presumably German, French servers etc still come with the default of ISO-8859-1?  Do you ever change it to use UTF-8 as a standard?

    Image:Content encoding information within HTML or XHTML markup

    Image:Content encoding information within HTML or XHTML markup