SitePoint Sponsor

User Tag List

Page 2 of 4 FirstFirst 1234 LastLast
Results 26 to 50 of 88
  1. #26
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Lot's of Lemmings are jumping off cliffs, do you want to be a Lemming?
    http://www.spartanicus.utvinternet.ie/no-xhtml.htm

    That is actualy not true. This myth comes from a nature movie made by Disney, which wanted to show the idiocy of lemmings (or whatever) and threw bucketfuls of them over the edge of a cliff.

    Therefore, I'll continue to use XHTML 1.1.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  2. #27
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I keep seeing on forums (and here on this thread ) that IE cannot handle xhtml served as content type xhtml+xml.

    I've been serving websites as the following for months with no problems in IE.

    PHP Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr">
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=iso-8859-1" />
    </head>
    <body>
    </body>
    </html>
    The example given in the link above is just stupid. They send the document with an .xhtml extension so IE prompts you to download it. I put the same code on one of my servers and have the server parse .xhtml extensions and IE does not have a problem. http://www.easywebdev.com/demo.xhtml That is a webserver issue not a browser one, looks like people think because firefox can render a doc with an .xhtml extension IE can't handle xhtml at all.

    Anyone care to offer up some concrete proof of IE having problems with xhtml? I can't find any.

  3. #28
    SitePoint Wizard bronze trophy Tailslide's Avatar
    Join Date
    Feb 2006
    Location
    Bedford, UK
    Posts
    1,687
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Easywebdev
    I put the same code on one of my servers and have the server parse .xhtml extensions and IE does not have a problem. http://www.easywebdev.com/demo.xhtml That is a webserver issue not a browser one, looks like people think because firefox can render a doc with an .xhtml extension IE can't handle xhtml at all.
    Sorry, I may be being thick Easywebdev, but that url you quote is being served as text/html by your server rather than application/xhtml+xml so IE wouldn't have a problem with it - it thinks it's "tag soup". You'd need to get the server to serve the page as application/xhtml+xml to see the issue with IE.
    Little Blue Plane Web Design
    Blood, Sweat & Rust - A Land Rover restoration project

  4. #29
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That demo is from the link above my first post. They give it as an example of IE not supporting xhtml but the reason IE prompts for a download from their site and not mine is their server does not parse .xhtml extensions.

    I'm going to do a little experimenting with the server side and get it to serve .xhtml as an xhtml+xml mimetype.

  5. #30
    SitePoint Wizard bronze trophy Tailslide's Avatar
    Join Date
    Feb 2006
    Location
    Bedford, UK
    Posts
    1,687
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Let us know what happens!
    Little Blue Plane Web Design
    Blood, Sweat & Rust - A Land Rover restoration project

  6. #31
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Blech, when I serve files with an .xhtml extension as application/xhtml+xml IE spits it's dummy out and prompts to download the file. Just checked the link to the original and they do serve it as application/xhtml+xml. Heh, I jumped on the .xhtml extension and stuck my foot in my mouth without doing any testing

    I'll leave the file in place in case anyone wants to experiment with it.

    Looks like I've been feeding IE tag soup.

  7. #32
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,424
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Easywebdev
    I keep seeing on forums (and here on this thread ) that IE cannot handle xhtml served as content type xhtml+xml.

    I've been serving websites as the following for months with no problems in IE.

    PHP Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr">
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=iso-8859-1" />
    </head>
    <body>
    </body>
    </html>
    The example given in the link above is just stupid. They send the document with an .xhtml extension so IE prompts you to download it. I put the same code on one of my servers and have the server parse .xhtml extensions and IE does not have a problem. http://www.easywebdev.com/demo.xhtml That is a webserver issue not a browser one, looks like people think because firefox can render a doc with an .xhtml extension IE can't handle xhtml at all.

    Anyone care to offer up some concrete proof of IE having problems with xhtml? I can't find any.
    1) Unless your serving up your pages as application/xhtml+xml then this isn't real xhtml. It's fake xhtml.

    2) IE is displaying your pages using quirks mode because you used <?xml version="1.0" encoding="iso-8859-1"?>. So basically you've wasted your time using xhtml and standards because IE is rendering your pages the same way it renders a crappy frontpage website. Remove that line and be happy with valid fake xhtml and then wait until IE can handle true xhtml like the rest of us.

  8. #33
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    No. IE cannot handle XHTML as 'application/xhtml+xml' regardless of extension, nether does it properly handle HTML 4.01 but that's another story.

  9. #34
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Easywebdev
    I've been serving websites as the following for months with no problems in IE.
    I assume that you mean that you're specifying application/xhtml+xml in your <meta/> tag. In that case I'm sorry to inform you that it has no effect whatsoever.

    The media type (a.k.a. content type, a.k.a. MIME type) must be sent as a proper HTTP header by the server. The user agent needs to know the content type before it receives a single byte of the document.
    Birnam wood is come to Dunsinane

  10. #35
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep, I was using the meta tag. I set up apache on my server to send .xhtml files with "AddType application/xhtml+xml .xhtml" and IE has no idea what to do with it. Hopefully support will be in for the mime type in IE7 but I won't hold my breath.

  11. #36
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Look, the lack of support for application/xhtml+xml is irrelevant; application/xml already works fine and is basically the same (it triggers the XML parser in the browser, which is all you need). The key is that IE doens't support the XHTML namespace. And no, that won't change for IE7.
    Simon Pieters

  12. #37
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IE7 will not support XHTML.

    Using application/xml 'works', but you will have to make changes to your IE style sheet since the document will be handled as generic XML. You'll have to declare display:block for all block-level element types, etc. You'll probably run into serious problems with lists and tables.

    Also, I haven't checked the implications of this method in conjunction with assistive technologies. I assume there may be problems, since all semantics are lost (for IE and anything on top of that).
    Birnam wood is come to Dunsinane

  13. #38
    SitePoint Zealot barleytwist's Avatar
    Join Date
    Dec 2005
    Location
    Lulworth, Dorset, UK
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    So what's best to use at this time?

    Getting a headache with this one.

    Can someone post a (useable) head section that is asking for The latest (XHTML) from compliant browsers but tuned also to IE6/7 so that it renders OK. I've lost it in the cafuffle above. Cheers?

    Do screen readers have a problem with any of this stuff or do they just look at the rendered results?

  14. #39
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Screen readers don't care what the page looks like -- they just read the text.

    Here you go:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <meta http-equiv="Content-Script-Type" content="text/javascript" />
    <title></title>
    </head>
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  15. #40
    SitePoint Zealot barleytwist's Avatar
    Join Date
    Dec 2005
    Location
    Lulworth, Dorset, UK
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, I have added the two below (missing)
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <meta http-equiv="Content-Script-Type" content="text/javascript" />

    but also have lower down:

    <link href="css/mainStyle2.css" rel="stylesheet" type="text/css" media="screen,projection" />
    <script type="text/javascript" src="js/functions.js"></script>

    should these be repeated?

  16. #41
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by barleytwist View Post
    Ah, I have added the two below (missing)
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <meta http-equiv="Content-Script-Type" content="text/javascript" />
    Content-Style-Type is not necessary unless you use style attributes in your markup. A modern document should use external CSS style sheets or, at worst, a style element in the document head.

    Content-Script-Type is not necessary unless you use event attributes (such as onclick) in your markup. A modern document should use external unobtrusive scripts.
    Birnam wood is come to Dunsinane

  17. #42
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm... Perhaps I misinterpreted what those are for. I suppose they are only useful when you use inline styles and event handlers, since you should specify the type attribute on style, link, and script elements anyway. It's ironic that most people who use inline styles and event handlers probably don't include those meta elements or use the equivalent HTTP headers.

    Really, if you send the right HTTP headers and you don't want to specify keywords for the page a give it a description, you don't need any meta elements at all.

    I definitely agree with you, Tommy, that we should avoid using inline styles and avoid using inline event handlers by making use of modern unobtrusive JavaScript techniques.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  18. #43
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kravvitz View Post
    Really, if you send the right HTTP headers and you don't want to specify keywords for the page a give it a description, you don't need any meta elements at all.
    Providing HTTP equivalents (for encoding and, where applicable, style and script types) in META elements has its uses. They can be applied when the document is saved to the hard-drive and then viewed locally, i.e., with no HTTP server to send proper headers.

    User agents are not required to pay attention to those equivalents, though.
    Birnam wood is come to Dunsinane

  19. #44
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    True. That's why it's highly recommended that all documents use the Content-Type meta element.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  20. #45
    SitePoint Evangelist anjanesh's Avatar
    Join Date
    Jun 2004
    Location
    Mumbai
    Posts
    447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Started reading this thread and at the end it became very very confusing.

    Can anyone pl post a small example of a TRUE xHTML 1.1 document (application/xhtml+xml) and another of a TRUE XML based document (application/xhtml+xml) ?

    I thought this was a true xHTML 1.1 doc but it seems it isn't.
    HTML Code:
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr">
    <head>
    <title>Test</title>
    <meta http-equiv="Content-Type" content="application/xhtml+xml;"/>
    </head>
    <body>
    <div>
    Text
    </div>
    </body>
    </html>
    The media type (a.k.a. content type, a.k.a. MIME type) must be sent as a proper HTTP header by the server. The user agent needs to know the content type before it receives a single byte of the document.
    And so I inserted this at the beginning.
    PHP Code:
    <?php 
    header
    ('Content-type: application/xhtml+xml');
    header("Cache-Control: must-revalidate");
    ?>
    And it works (displays) in IE7 and FF2.

    I changed
    HTML Code:
    <div>Text</div>
    to
    HTML Code:
    <div>Text<div>
    which is wrong and FF shows
    Code:
    XML Parsing Error: mismatched tag. Expected: </div>.
    Location: http://localhost/test/test-2.htm
    Line Number 12, Column 3:</body>
    --^
    This wont come up if header('Content-type: application/xhtml+xml'); isnt given.

    Ofcourse IE7 isn't showing any error, but it doesn't seem to be treating it like generic XML.


    Edit: I just wanted to know what error are we supposed to be expecting in IE ? Or has version 7 worked things out ?



    Thanx
    Last edited by anjanesh; Jan 26, 2007 at 11:02.
    Anjanesh

  21. #46
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't have access to IE7, but it does not support XHTML. Either there's something trivial, like you're seeing a cached previous version of the page that was served as text/html, or else Microsoft have tweaked IE7 to accept application/xhtml+xml even though it doesn't support it (presumably treating it as HTML).


    The sample you posted seems to be a valid XHTML 1.1 document, although the <meta/> element is pointless – especially if you serve it as application/xhtml+xml. You can't change the content type this way, and the usual reason for including it in HTML and pretend-XHTML pages is to specify the character encoding. In real XHTML and other XML documents, the encoding should be specified by the XML declaration, just like in your sample.
    Birnam wood is come to Dunsinane

  22. #47
    SitePoint Evangelist anjanesh's Avatar
    Join Date
    Jun 2004
    Location
    Mumbai
    Posts
    447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But I also edited the html to add the php code at the beginning:
    Code:
    <?php
    header('Content-type: application/xhtml+xml');
    header('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0');
    ?>
    which doesn't cache the page and it still displays correctly. I guess IE7 must have been improved to atleast read it and treat it as html. But Im glad FF is treating it as XML, it makes error-checking mush easier - instead of depending on FireBug and HTMLValidator for every small misplaced tag.
    Anjanesh

  23. #48
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by anjanesh View Post
    But I also edited the html to add the php code at the beginning:
    Code:
    <?php
    header('Content-type: application/xhtml+xml');
    header('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0');
    ?>
    which doesn't cache the page and it still displays correctly.
    It can still be in IE7's cache (if the previous text/html version didn't have the Cache-Control header). Try to force a reload or load the file from disk (using .xml as file extension).
    Quote Originally Posted by anjanesh View Post
    I guess IE7 must have been improved to atleast read it and treat it as html.
    That would not be an improvement at all! Doing that is horrible. It's like claiming to support PNG but instead interpreting image/png images as if they were GIF. Doing so is against the specs, and if authors would only test their XML documents against IE7 and it shows "fine" even though it's not well-formed, then they would think that their documents are fine yet they would break in all other UAs.
    Quote Originally Posted by anjanesh View Post
    But Im glad FF is treating it as XML, it makes error-checking mush easier - instead of depending on FireBug and HTMLValidator for every small misplaced tag.
    I'm pretty sure that, unless you have hacked your registry manually, IE7 will ask you to save application/xhtml+xml resources, and text/xml or application/xml will be treated as XML (and then the XHTML namespace is not recognized).
    Simon Pieters

  24. #49
    SitePoint Evangelist anjanesh's Avatar
    Join Date
    Jun 2004
    Location
    Mumbai
    Posts
    447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by zcorpan View Post
    I'm pretty sure that, unless you have hacked your registry manually, IE7 will ask you to save application/xhtml+xml resources
    Cleared all IE-cache and still find that IE7 displays application/xhtml+xml instead of asking to save it. It may treating it as html instead of xhtml but its definitely not asking to save.

    I did not hack the registry but I did install the IE Developer Toolbar if that helps.
    Anjanesh

  25. #50
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tested downloading the IE Developer Toolbar but it prompts to save for me.

    Did you try loading an .xml file from disk? Or try this one: http://mozillaquestquest.com/. Or try loading an application/xhtml+xml page that you know isn't well-formed (like this one) -- if your IE7 doesn't show an XML parse error then it's using the tag soup parser, and that isn't the default behaviour of IE7.
    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
  •