Submit Your Article Forum Rules

Results 1 to 6 of 6

Thread: http-equiv="Content-Type"

  1. #1
    Senior Member MrLeN's Avatar
    Join Date
    Jul 2003
    Posts
    382

    http-equiv="Content-Type"

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

    I am pretty sure that there is an alterntive for:

    http-equiv="Content-Type"

    ..but I can't remember what it is.

    Does anyone know?

    MrLeN

  2. #2
    Senior Member paulhiles's Avatar
    Join Date
    Jul 2003
    Posts
    2,073

    Content types are also known as MIME types

    I am pretty sure that there is an alterntive for:

    http-equiv="Content-Type"
    Content types denote what kind of file is being transmitted over the Web. Files are tagged according to the MIME standard, using type designations like text/plain, text/html, image/jpeg, or video/quicktime. Type designations that are not officially registered have an x- prefix, like audio/x-midi or application/x-javascript. The Internet Assigned Numbers Authority (IANA) maintains the official registry of content types.

    They are sometimes referred to as mime types, maybe that is causing the confusion?

    MIME content types are the standard way of denoting the nature of a file transmitted over the Web. Originally, the e-mail protocol supported only plain text. MIME (Multipurpose Internet Mail Extensions) were originally devised to tag e-mail with content types, allowing people to send images, audio, video, programs or other sorts of files. Over time, these content types were used to label content types in many other Internet protocols.

    Source

  3. #3
    Senior Member paulhiles's Avatar
    Join Date
    Jul 2003
    Posts
    2,073

    Serving up XHTML with the correct MIME type

    There is a great explanation of the correct way to "serve up" XHTML with the correct mime type here:

    Serving up XHTML with the correct MIME type

    A PHP code sample is illustrated showing how you might deliver the correct header appropriate to the host server.

    Useful Reference:
    Mime Types List - shows you a list of common MIME types and their corresponding file extensions.

    The important thing to remember is the purpose of the Content-type meta tag. By using the Content-type (mime type), you are effectively telling a user agent (Web browser, PDA, etc) what sort of content is contained within your document. This can be read from the document's header without the need to explore the body of the file.

  4. #4
    Senior Member MrLeN's Avatar
    Join Date
    Jul 2003
    Posts
    382
    Yeah, but when I run my tidy tool it tells me:

    Warning: <meta> unrecognized attribite value "http-equiv"
    I think I get this arror because this tag is meant for xhtml.

    All I am trying to do is display the doctype. The one I have works fine, and validates at W3C:

    <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
    I am 1000.1% sure that I came across this problem before and found alternative code to use, that didn't get rejected by my tidy tool.

    I just can't quite remember. All I am looking for is for a valid way to include the charset for html 4.0

    MrLeN

  5. #5
    Senior Member paulhiles's Avatar
    Join Date
    Jul 2003
    Posts
    2,073

    Validating charset

    Have you tried using the typical Western Latin (1) charset? OR just using lower-case?

    Code:
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    trailing end slash is just for XHTML, you can remove for HTML 4.0

    Personally, I would validate by the W3C standards rather than HTML Tidy, however neat a utility it may be! :o)
    Useful reference for international charsets

    Paul

  6. #6
    Senior Member MrLeN's Avatar
    Join Date
    Jul 2003
    Posts
    382
    I am validating with W3C and I am using:

    <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
    ..and it's all cool. It wont validate with the trailing back slash of course, so I removed it.

    However, every time I try to tidy a page, which I do after editing, every time, to make sure that there aren't any rogue <div>'s it takes away the http-equiv="Content-Type" part :(

    I am using the Tidy Tool that comes with 1stPage

    The tidy tool is pretty popular, as far as I know. It was written by Dave Raggett of W3C, but it has a copyright of 1999. Maybe in 1999 http-equiv="Content-Type" wasn't used?

    Anyway, I am absolutely convinced that there's another way to include the utf8 charset. I have come across this same problem before.

    There's some code that W3C and my tidy tool sees as valid. I am quite sure.

    MrLeN

Similar Threads

  1. When does "similar" = "duplicate content" for Google?
    By zwickes in forum Google Discussion Forum
    Replies: 5
    Last Post: 04-03-2010, 04:45 AM
  2. <meta name="robots" content="noindex,nofol
    By Lilnaniam in forum Submit Your Site For Review
    Replies: 2
    Last Post: 12-16-2005, 08:52 AM
  3. Javascript help needed for "slideshow" type featur
    By steve0 in forum Web Programming Discussion Forum
    Replies: 13
    Last Post: 09-04-2005, 08:48 PM
  4. google: "link to" and "content contains"
    By truelysam in forum Google Discussion Forum
    Replies: 0
    Last Post: 12-23-2004, 10:49 PM
  5. <META name="robots" content="NOINDEX, NOFO
    By theiceman in forum Search Engine Optimization Forum
    Replies: 2
    Last Post: 09-03-2004, 11:41 PM

Posting Permissions

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