SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Guru bronze trophy AndrewCooper's Avatar
    Join Date
    Sep 2008
    Location
    Manchester, UK
    Posts
    631
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    HTTP Header Equivalents

    I posted the following message / comment on this Web page: http://reference.sitepoint.com/html/meta/http-equiv on Sat, 15 Aug 2009 04:26:45 GMT and figured I'd have a reply by now, but clearly not as it's not been moderated or seen to, so heres what I sent to this page:

    Is "Content-Language" not a value? I've read somewhere that it is. Isn't there a link to a defined list of HTTP Header Equivalents on the W3C Website somewhere? Can you give me the link please?

    Kind regards,
    Andrew Cooper
    Firstly, I'd like a reply to this to see whether the list on that page has complete accuracy / completeness.

    And also I have a few links with HTTP Header Equivalents that state "Content-Language" is a value but I can't remember where abouts on the W3C Website or any other official Website it states this.

    Either way, I'd like to know the original source of the list that is on that page. I'm sure Ian Lloyd knows what he's talking about, but I'd like to know where he got that list / information from .

    Kind regards,

    Andrew Cooper

    [100th Post ]

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,227
    Mentioned
    194 Post(s)
    Tagged
    2 Thread(s)

  3. #3
    SitePoint Guru bronze trophy AndrewCooper's Avatar
    Join Date
    Sep 2008
    Location
    Manchester, UK
    Posts
    631
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mittineague View Post
    Nope, not that. I'm looking for something, possibly on the W3C Website or some other authority / association that has -that- kind of authority to say which HTTP Header Equivalent values are allowed and aren't.

    Basically, is "Content-Language" a valid content-type?

    I already know some of the Codes for the Representation of Names of Languages already but thanks for the link, good resource .

    Andrew Cooper

  4. #4
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The HTTP spec lists the HTTP headers that it defines:

    http://www.ietf.org/rfc/rfc2616.txt

    HTML4 references the HTTP spec for valid HTTP headers for <meta http-equiv>.

    http://www.w3.org/TR/html401/struct/...def-http-equiv

    However, HTML4 says that this attribute is to be used by HTTP servers -- not by browsers. In reality, servers ignore it and browsers use it.

    The HTML5 spec is slightly closer to reality and gives requirements on browsers for http-equiv, but only allows a handful of values:

    http://www.whatwg.org/specs/web-apps...eta-http-equiv

    HTML5 says http-equiv=content-language is conforming but obsolete (you should use <html lang> instead).

    HTH,
    Simon Pieters

  5. #5
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,227
    Mentioned
    194 Post(s)
    Tagged
    2 Thread(s)
    OK, know I see. Like I use PHP
    PHP Code:
    header("Content-Type: application/xhtml+xml; charset=utf-8"); 
    to send out the HTTP header
    Code:
    Content-Type: application/xhtml+xml; charset=utf-8
    and have this tag in my page heads
    HTML Code:
    <meta http-equiv='Content-Type' content='application/xhtml+xml; charset=utf-8' />
    you're talking about the HTTP header
    Code:
    Content-Language: en
    (my server's default), and it's corresponding meta hhtp-equiv tag.

    I've never used one, my US-centric ignorance I guess, so I'm glad they're obsolete

  6. #6
    SitePoint Guru bronze trophy AndrewCooper's Avatar
    Join Date
    Sep 2008
    Location
    Manchester, UK
    Posts
    631
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by zcorpan View Post
    The HTTP spec lists the HTTP headers that it defines:

    http://www.ietf.org/rfc/rfc2616.txt

    HTML4 references the HTTP spec for valid HTTP headers for <meta http-equiv>.

    http://www.w3.org/TR/html401/struct/...def-http-equiv

    However, HTML4 says that this attribute is to be used by HTTP servers -- not by browsers. In reality, servers ignore it and browsers use it.

    The HTML5 spec is slightly closer to reality and gives requirements on browsers for http-equiv, but only allows a handful of values:

    http://www.whatwg.org/specs/web-apps...eta-http-equiv

    HTML5 says http-equiv=content-language is conforming but obsolete (you should use <html lang> instead).

    HTH,
    Thanks very much for the explanation and the links, I understand it a lot clearer now. So it's discouraged to use <meta http-equiv="Content-Language" content="en"> and it's encouraged to use <html lang="en"> instead?

    Andrew Cooper

  7. #7
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes.
    Simon Pieters


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •