Content-type

Discussion in 'HTML' started by Jeff Thies, Jul 11, 2004.

  1. Jeff Thies

    Jeff Thies Guest

    I'd like to know what content-type the server is sending. In
    particular what character set is being used.

    Does the server send the content-type by looking at the page extension
    (mime types?) Or does it try to read file. The server in question is
    probably IIS6.

    If I use view info in NS7.1 it reports a character encoding. I'm
    thinking that this is probably read from the document, not the char set
    sent in the header, but I don't know. I'm unable to find page properties
    in Opera and I'm unsure of what IE reports/

    I'm still trying to sort this:

    <URL: http://paydayusa.com/MainMenu/MainMenu.htm >

    This appears to be broken UTF-16LE.

    Cheers,
    Jeff
     
    Jeff Thies, Jul 11, 2004
    #1
    1. Advertising

  2. Jeff Thies

    Dave Patton Guest

    Jeff Thies <> wrote in
    news:Y6gIc.1882$:

    > I'd like to know what content-type the server is sending. In
    > particular what character set is being used.


    > I'm still trying to sort this:
    >
    ><URL: http://paydayusa.com/MainMenu/MainMenu.htm >


    Using MiArt's HTTP Header Info Tool:
    http://www.miart.co.uk/headertool.htm
    HTTP Header Info
    --------------------------------
    HTTP/1.0 200 OK
    Accept-Ranges: bytes
    Date: Sun, 11 Jul 2004 19:13:33 GMT
    Content-Length: 54448
    Content-Type: text/html
    Server: Microsoft-IIS/5.0
    MicrosoftOfficeWebServer: 5.0_Pub
    Last-Modified: Fri, 21 May 2004 17:19:49 GMT
    ETag: "3c1c23d2573fc41:92e"
    Via: 1.1 px7wh (NetCache NetApp/5.6)

    --
    Dave Patton
    Canadian Coordinator, Degree Confluence Project
    http://www.confluence.org/
    My website: http://members.shaw.ca/davepatton/
     
    Dave Patton, Jul 11, 2004
    #2
    1. Advertising

  3. Jeff Thies wrote:

    > I'd like to know what content-type the server is sending. In
    > particular what character set is being used.


    It's good to be aware of such things.

    Simplest way is to telnet into port 80 of your webserver and enter the
    following three lines:
    HEAD /full/url/of/file HTTP/1.1
    Host: your.domain.name

    Note: the third line is blank. :)

    The response will be the full HTTP headers -- including the Content-Type
    header.

    > Does the server send the content-type by looking at the page extension


    Often, yes. It depends on how the server has been set up and its
    capabilities.

    > Or does it try to read file.


    Sometimes (see the mod_magic module for Apache).

    > The server in question is probably IIS6.


    In that case, probably purely by file extension.

    > I'm unable to find page properties in Opera


    Use the hotlist (or "panels" in 7.5x terminology) and show the "Info"
    panel.

    > I'm still trying to sort this:
    > <URL: http://paydayusa.com/MainMenu/MainMenu.htm >


    Headers:

    200 OK
    Connection: close
    Date: Sun, 11 Jul 2004 20:03:10 GMT
    Accept-Ranges: bytes
    ETag: "3c1c23d2573fc41:92e"
    Server: Microsoft-IIS/5.0
    Content-Length: 54448
    Content-Type: text/html
    Last-Modified: Fri, 21 May 2004 17:19:49 GMT
    Client-Date: Sun, 11 Jul 2004 20:07:59 GMT
    Client-Peer: 209.16.232.100:80
    Client-Response-Num: 1
    MicrosoftOfficeWebServer: 5.0_Pub

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, Jul 11, 2004
    #3
  4. Jeff Thies

    brucie Guest

    brucie, Jul 11, 2004
    #4
  5. Jeff Thies

    Art Sackett Guest

    Jeff Thies <> wrote:
    > I'd like to know what content-type the server is sending. In
    > particular what character set is being used.


    If you have a copy of lynx handy (as you probably should, for a variety
    of reasons):

    lynx -head http://www.domain-in-question.tld/

    That'll get you the HTTP headers, but it might not get you a charset.
    And even if it does somehow get you a charset, there's no guarantee
    that it's not being overridden by the document, or by the client
    software doing some heuristic nonsense.

    --
    Art Sackett,
    Patron Saint of Drunken Fornication
     
    Art Sackett, Jul 12, 2004
    #5
  6. (Art Sackett) wrote:

    > lynx -head http://www.domain-in-question.tld/
    >
    > That'll get you the HTTP headers, but it might not get you a charset.


    It will get the charset if and only if the charset is specified in the
    HTTP headers (in the Content-Type header).

    > And even if it does somehow get you a charset, there's no guarantee
    > that it's not being overridden by the document, or by the client
    > software doing some heuristic nonsense.


    There's a recent discussion in comp.infosystems.www.authoring.html
    that has confirmed the observation that no browser is known to violate
    the rule that charset specified in HTTP headers takes precedence over any
    attempts to specify the charset inside the document itself (e.g., in
    a <meta> tag).

    If the headers don't specify the charset, browsers are allowed to (and
    generally will) use charset specified in a <meta> tag or in some other
    way. It gets fairly complex then, and at some point a browser is allowed
    to (and generally will) make some wild guess ("use heuristics"),
    typically letting the user try different encodings if the presentation
    does not look right (but this may well exceed the user's capabilities).

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, Jul 12, 2004
    #6
    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. TheKeith
    Replies:
    20
    Views:
    107,186
    Chris Morris
    Oct 29, 2003
  2. hazz
    Replies:
    6
    Views:
    50,036
    SkyUCHC
    Jun 9, 2010
  3. Stanimir Stamenkov
    Replies:
    2
    Views:
    790
    Stanimir Stamenkov
    Oct 25, 2005
  4. heyo
    Replies:
    3
    Views:
    958
    Dan Pop
    Apr 1, 2004
  5. Lampa Dario
    Replies:
    3
    Views:
    476
    Old Wolf
    Sep 10, 2005
Loading...

Share This Page