<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">?

Discussion in 'HTML' started by TheKeith, Oct 19, 2003.

  1. TheKeith

    TheKeith Guest

    Dreamweaver puts that tag in the head section of every page? Can someone
    tell me what it's for and if it's needed? Thanks.
     
    TheKeith, Oct 19, 2003
    #1
    1. Advertising

  2. TheKeith

    Denise Enck Guest

    "TheKeith" <> wrote in message
    news:...
    > Dreamweaver puts that tag in the head section of every page? Can someone
    > tell me what it's for and if it's needed? Thanks.
    >


    Yes, it's needed. It specifies which character encoding is being used on the
    page.
    http://www.htmlhelp.com/tools/validator/charset.html

    cheers ~
    Denise
     
    Denise Enck, Oct 19, 2003
    #2
    1. Advertising

  3. TheKeith

    TheKeith Guest

    thanks

    "Denise Enck" <> wrote in message
    news:uJlkb.1961$...
    > "TheKeith" <> wrote in message
    > news:...
    > > Dreamweaver puts that tag in the head section of every page? Can someone
    > > tell me what it's for and if it's needed? Thanks.
    > >

    >
    > Yes, it's needed. It specifies which character encoding is being used on

    the
    > page.
    > http://www.htmlhelp.com/tools/validator/charset.html
    >
    > cheers ~
    > Denise
    >
    >
     
    TheKeith, Oct 19, 2003
    #3
  4. Leif K-Brooks, Oct 19, 2003
    #4
  5. TheKeith

    brucie Guest

    In post <>
    TheKeith said...

    > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    > Dreamweaver puts that tag in the head section of every page?


    1. stop DW from doing it and
    2. configure your server to do it.

    in a .htaccess file:

    AddType text/html;charset=ISO-8859-1 .html

    > Can someone tell me what it's for


    the file content type and character encoding

    4.3 The text/html content type
    http://www.w3.org/TR/html401/conform.html#h-4.3

    5.2.2 Specifying the character encoding
    http://www.w3.org/TR/html401/charset.html#h-5.2.2

    > and if it's needed?


    yes

    --
    brucie.
    19/October/2003 11:27:42 am
     
    brucie, Oct 19, 2003
    #5
  6. TheKeith

    Micah Cowan Guest

    brucie <> writes:

    > In post <>
    > TheKeith said...
    >
    > > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    > > Dreamweaver puts that tag in the head section of every page?

    >
    > 1. stop DW from doing it and
    > 2. configure your server to do it.
    >
    > in a .htaccess file:
    >
    > AddType text/html;charset=ISO-8859-1 .html


    Why? I understand the preference that it be set in the actual
    HTTP headers; but isn't it helpful to have the same information
    within the document itself? That way encoding information is
    preserved when (say) the document is saved to the viewer's
    system: the browser doesn't get HTTP headers when that document
    is opened for viewing later, so the <meta> tag would seem handy
    for that case.

    BTW, I prefer

    AddCharset ISO-8859-1 .html

    The above feels a little like cheating (i.e., it's really not
    part of the "type"...)

    -Micah
     
    Micah Cowan, Oct 19, 2003
    #6
  7. TheKeith

    brucie Guest

    In post <>
    Micah Cowan said...

    >> AddType text/html;charset=ISO-8859-1 .html


    > Why? I understand the preference that it be set in the actual
    > HTTP headers; but isn't it helpful to have the same information
    > within the document itself?


    the UA is under no obligation to take any notice of meta data.

    > BTW, I prefer
    > AddCharset ISO-8859-1 .html
    > The above feels a little like cheating (i.e., it's really not
    > part of the "type"...)


    the charset is a valid optional parameter of the text/html content
    type.


    --
    brucie.
    19/October/2003 06:17:33 pm
     
    brucie, Oct 19, 2003
    #7
  8. brucie wrote:

    > the UA is under no obligation to take any notice of meta data.


    No, but might as well give it the choice.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?id=132
     
    Toby A Inkster, Oct 19, 2003
    #8
  9. brucie wrote:
    > In post <>
    > TheKeith said...


    >> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    >> Dreamweaver puts that tag in the head section of every page?


    > 1. stop DW from doing it and
    > 2. configure your server to do it.


    > in a .htaccess file:


    > AddType text/html;charset=ISO-8859-1 .html


    What should permissions, be, there? Seems like it should be protected,
    but if I don't allow world-readability, I can't browse to the site -- I
    get a 403.

    --
    Blinky Linux RU 297263
    NEW 9/25/03:
    MS Class Action Award Vouchers for California Residents
    Detail --> http://snurl.com/settlement
     
    Blinky the Shark, Oct 19, 2003
    #9
  10. TheKeith

    Micah Cowan Guest

    brucie <> writes:

    > In post <>
    > Micah Cowan said...
    >
    > >> AddType text/html;charset=ISO-8859-1 .html

    >
    > > Why? I understand the preference that it be set in the actual
    > > HTTP headers; but isn't it helpful to have the same information
    > > within the document itself?

    >
    > the UA is under no obligation to take any notice of meta data.


    Yes, but is this a valid reason to

    >> 1. stop DW from doing it


    ?

    My preference is to specify it in as many locations as
    possible. Since I generally use XHTML, I have it in the XML
    declaration, in the meta tags and in the proper HTTP headers.

    > > BTW, I prefer
    > > AddCharset ISO-8859-1 .html
    > > The above feels a little like cheating (i.e., it's really not
    > > part of the "type"...)

    >
    > the charset is a valid optional parameter of the text/html content
    > type.


    Yes, but that's irrelevant. "AddType" isn't an HTTP Content-Type
    header; it's an Apache directive which tells it *part* of how it
    should formulate one. The apache documentation says it should be
    used to specify the MIME-Type; it doesn't say it should be used
    to specify parameters to the Content-Type header (doesn't even
    say it's possible). OTOH, it specifically provides a directive to
    specify that parameter in the "AddCharset" directive; so why not
    use that, as that's what it's clearly intended for?

    Just my 2ยข, naturally
    -Micah
     
    Micah Cowan, Oct 20, 2003
    #10
  11. TheKeith

    Isofarro Guest

    Isofarro, Oct 21, 2003
    #11
  12. TheKeith

    Micah Cowan Guest

    Isofarro <> writes:

    > Micah Cowan wrote:
    >
    > > brucie <> writes:
    > >
    > >> the UA is under no obligation to take any notice of meta data.

    > >
    > > Yes, but is this a valid reason to

    >
    > Not all UA's parse HTML files.


    So? Please read the rest of what I said in the message you snipped, and
    then answer if you like.

    --
    Micah J. Cowan
     
    Micah Cowan, Oct 23, 2003
    #12
  13. TheKeith

    Isofarro Guest

    Micah Cowan wrote:

    > Isofarro <> writes:
    >
    >> Micah Cowan wrote:
    >>
    >> > brucie <> writes:
    >> >
    >> >> the UA is under no obligation to take any notice of meta data.
    >> >
    >> > Yes, but is this a valid reason to

    >>
    >> Not all UA's parse HTML files.

    >
    > So?


    There are no practical benefits for them to suddenly start parsing HTML just
    to extract a content type (extended or otherwise). All the better to keep
    it in the rightful place in the HTTP header.

    > Please read the rest of what I said in the message you snipped, and
    > then answer if you like.


    Doesn't mention or clarify why you consider it a valid reason for User
    Agents to take notice of meta-data, so no further quotage is needed. There
    are no questions relevant to that issue in the snipped material.

    --
    Iso.
    FAQs: http://html-faq.com http://alt-html.org http://allmyfaqs.com/
    Recommended Hosting: http://www.affordablehost.com/
    Web Design Tutorial: http://www.sitepoint.com/article/1010
     
    Isofarro, Oct 23, 2003
    #13
  14. TheKeith

    Micah Cowan Guest

    Isofarro <> writes:

    > Micah Cowan wrote:
    >
    > > Isofarro <> writes:
    > >
    > >> Micah Cowan wrote:
    > >>
    > >> > brucie <> writes:
    > >> >
    > >> >> the UA is under no obligation to take any notice of meta data.
    > >> >
    > >> > Yes, but is this a valid reason to
    > >>
    > >> Not all UA's parse HTML files.

    > >
    > > So?

    >
    > There are no practical benefits for them to suddenly start parsing HTML just
    > to extract a content type (extended or otherwise). All the better to keep
    > it in the rightful place in the HTTP header.


    I'm not expecting them to: neither have I in this thread, even
    once, suggested that the HTTP header is not the most appropriate
    place for the content type to be specified. What I *did* say is
    that I don't understand why brucie would recommend that we *not*
    also specify it in a <meta> tag, as this provides useful
    information to user agents which *do* parse HTML, and which (if, e.g.,
    loading from local store) would not be likely to have the helpful
    context that HTTP headers provide.

    --
    Micah J. Cowan
     
    Micah Cowan, Oct 27, 2003
    #14
  15. TheKeith

    Isofarro Guest

    Isofarro, Oct 27, 2003
    #15
  16. Isofarro wrote:

    > Micah Cowan wrote:
    >
    >> What I *did* say is
    >> that I don't understand why brucie would recommend that we *not*
    >> also specify it in a <meta> tag, as this provides useful
    >> information to user agents which *do* parse HTML,

    >
    > To the _detriment_ of user-agents that don't.


    How can it have a detrimental effect on user agents if they don't even
    parse the HTML? Please explain.

    Wget, for example, doesn't parse HTML (unless it's in recursive mode).
    Apart from a *slight* increase in file size, what *detrimental* effect
    does the <meta http-equiv="Content-Type"> tag have?

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?id=132
     
    Toby A Inkster, Oct 28, 2003
    #16
  17. Toby A Inkster <> wrote in message news:<>...
    > Wget, for example, doesn't parse HTML (unless it's in recursive mode).
    > Apart from a *slight* increase in file size, what *detrimental* effect
    > does the <meta http-equiv="Content-Type"> tag have?


    There's the infamous "Netscape Burp", where Netscape 4.x browsers will
    display a page containing such a meta tag fully, then immediately
    clear the window and re-render it, sometimes a fairly slow process if
    the page is big and complex. Back when I was using NS 4.x as my
    primary browser (before switching to Mozilla, which I use now), I
    developed an extremely strong hatred for this meta tag and the site
    developers who use it.

    --
    Dan
     
    Daniel R. Tobias, Oct 28, 2003
    #17
  18. TheKeith

    Isofarro Guest

    Toby A Inkster wrote:

    > Isofarro wrote:
    >
    >> Micah Cowan wrote:
    >>
    >>> What I *did* say is
    >>> that I don't understand why brucie would recommend that we *not*
    >>> also specify it in a <meta> tag, as this provides useful
    >>> information to user agents which *do* parse HTML,

    >>
    >> To the _detriment_ of user-agents that don't.

    >
    > How can it have a detrimental effect on user agents if they don't even
    > parse the HTML? Please explain.


    Take a UA that indexes text/html files. If they've got to parse the Entity
    Body every single time just to figure out what the correct content type is,
    that means on an update cycle, the entire resource (be it an html document,
    image, mp3, divx) has to be requested on each update cycle, since the
    information won't be in the Response header on a HEAD request. That alone
    breaks lots of tools.

    Now, in the scenario within this subthread, an indexer only interested in
    Western Latin character sets information - as opposed to DBCS character set
    material is going to have to expend a significant chunk of bandwith and
    time downloading and parsing through html resources that are not going to
    be indexed (as opposed to a HEAD request - wrong character set. Next URL).
    That's a massive waste of resources, resulting in a slower update cycle and
    higher resource usage.

    > Wget, for example, doesn't parse HTML (unless it's in recursive mode).
    > Apart from a *slight* increase in file size, what *detrimental* effect
    > does the <meta http-equiv="Content-Type"> tag have?


    The detrimential effects occurr when the content type is _only_ available in
    the meta element. Where an otherwise HEAD only request is sufficient to
    check whether a resource has changed before requesting, this is now no
    longer possible and the entire resource has to be downloaded before the
    correct determination can be made.

    --
    Iso.
    FAQs: http://html-faq.com http://alt-html.org http://allmyfaqs.com/
    Recommended Hosting: http://www.affordablehost.com/
    Web Design Tutorial: http://www.sitepoint.com/article/1010
     
    Isofarro, Oct 28, 2003
    #18
  19. TheKeith

    Micah Cowan Guest

    Isofarro <> writes:

    > Toby A Inkster wrote:
    >
    > > Isofarro wrote:
    > >
    > >> Micah Cowan wrote:
    > >>
    > >>> What I *did* say is
    > >>> that I don't understand why brucie would recommend that we *not*
    > >>> also specify it in a <meta> tag, as this provides useful
    > >>> information to user agents which *do* parse HTML,
    > >>
    > >> To the _detriment_ of user-agents that don't.

    > >
    > > How can it have a detrimental effect on user agents if they don't even
    > > parse the HTML? Please explain.

    >
    > Take a UA that indexes text/html files. If they've got to parse the Entity
    > Body every single time just to figure out what the correct content type is,
    > that means on an update cycle, the entire resource (be it an html document,
    > image, mp3, divx) has to be requested on each update cycle, since the
    > information won't be in the Response header on a HEAD request. That alone
    > breaks lots of tools.


    *Finally* someone actually begins to come close to actually
    *answering* the question I posed in the first place, rather than
    a lot of knee-jerk responses from people who clearly didn't read
    thoroughly in the first place.

    However... this is a ridiculous assertion. You already know it's
    text/html before you even begin parsing it (or at the very least,
    by the time you've read the DOCTYPE declaration). The meta tag
    will not and cannot change this: everyone knows the only reason
    to specify the Content-Type header in a <meta/> tag in the first
    place is to indicate the character encoding; a practice
    sanctioned by the spec. And the presence of <meta/>, or lack
    thereof, will not significantly impact the performance of a tool
    which has decided it has to put itself through this torture
    anyway.

    > Now, in the scenario within this subthread, an indexer only interested in
    > Western Latin character sets information - as opposed to DBCS character set
    > material is going to have to expend a significant chunk of bandwith and
    > time downloading and parsing through html resources that are not going to
    > be indexed (as opposed to a HEAD request - wrong character set. Next URL).
    > That's a massive waste of resources, resulting in a slower update cycle and
    > higher resource usage.


    Again, if you're doing *both* (setting the appropriate HTTP
    headers *and* setting the meta-tag equivalent), this is
    completely irrelevant.

    > > Wget, for example, doesn't parse HTML (unless it's in recursive mode).
    > > Apart from a *slight* increase in file size, what *detrimental* effect
    > > does the <meta http-equiv="Content-Type"> tag have?

    >
    > The detrimential effects occurr when the content type is _only_ available in
    > the meta element.


    And therefore still does not address the question at hand.

    Once again, I'm *not* asking why we should set the relevant HTTP
    headers: I can't imagine anyone thinking this is a bad thing. My
    question is, why discourage replication of the very same
    information (in particular, the character encoding via the
    "charset" parameter) in the <meta/> tag? What *possible* harm
    could this cause? You have still failed to address this.

    > Where an otherwise HEAD only request is sufficient to
    > check whether a resource has changed before requesting, this is now no
    > longer possible and the entire resource has to be downloaded before the
    > correct determination can be made.


    Again, you are addressing scenarios which you, and not I, have
    drumed up. This has nothing to do with the topic at hand.

    --
    Micah J. Cowan
     
    Micah Cowan, Oct 29, 2003
    #19
  20. Isofarro wrote:

    > Toby A Inkster wrote:
    >
    >> How can it have a detrimental effect on user agents if they don't even
    >> parse the HTML? Please explain.

    >
    > Take a UA that indexes text/html files. If they've got to parse the
    > Entity Body every single time just to figure out what the correct
    > content type is


    Why can't they just look at the HTTP header?

    >> Wget, for example, doesn't parse HTML (unless it's in recursive mode).
    >> Apart from a *slight* increase in file size, what *detrimental* effect
    >> does the <meta http-equiv="Content-Type"> tag have?

    >
    > The detrimential effects occurr when the content type is _only_ available in
    > the meta element.


    Which nobody has suggested as a wise course of action -- this entire
    thread has been about specifying the character set in both a <meta> tag
    *and* the HTTP header.

    Micah Cowen wrote:
    | My preference is to specify it in as many locations as
    | possible. Since I generally use XHTML, I have it in the XML
    | declaration, in the meta tags and in the proper HTTP headers.

    and then:
    | I'm not expecting them to: neither have I in this thread, even
    | once, suggested that the HTTP header is not the most appropriate
    | place for the content type to be specified.

    Micah and I have been arguing that it is sensible to specify the character
    set in <meta> *and* HTTP because then:

    * if a user agent has access to the HTTP header, but not the HTML file, or
    doesn't want to parse the HTML file, it can get the character set from the
    HTTP header.

    * if a user agent has access to the HTTP header and parses the HTML file,
    then it can get the character set from either. If the two character sets
    disagree, it might have to make an educated guess.

    * if a user agent does not have access to the HTTP header (e.g. it
    operates on locally saved files), then it can parse the HTML and find the
    character set there.

    So all user agents have access to the charset.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?id=132
     
    Toby A Inkster, Oct 29, 2003
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Donald Gordon

    UTF-8, LWP and http-equiv meta tags

    Donald Gordon, Feb 25, 2004, in forum: Perl
    Replies:
    0
    Views:
    603
    Donald Gordon
    Feb 25, 2004
  2. =?Utf-8?B?bWc=?=

    META HTTP-EQUIV="Refresh"

    =?Utf-8?B?bWc=?=, Jun 30, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    598
    Teemu Keiski
    Jun 30, 2004
  3. Titus A Ducksass
    Replies:
    1
    Views:
    6,056
    Sid Ismail
    Aug 1, 2003
  4. Nym Pseudo

    META NAME and META HTTP-EQUIV

    Nym Pseudo, Sep 26, 2003, in forum: HTML
    Replies:
    1
    Views:
    599
    =?iso-8859-1?Q?brucie?=
    Sep 26, 2003
  5. Sam
    Replies:
    1
    Views:
    9,316
    Michael Fesser
    Mar 7, 2006
Loading...

Share This Page