Results 1 to 5 of 5

Thread: How does wordpress do it?

  1. #1
    Join Date
    Mar 2007
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How does wordpress do it?

    If IE doesn't support XHTML, then how do they make their themes cross-browser compatible?

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It sends the XHTML with an HTML content type and expects the browser to error-correct it into HTML. This is generally bad practice (see XHTML Considered Harmful for some current practical reasons, on top of the many potential problems that may arise from and general nastiness of serving content as something other than what it is and the general issues of serving invalid code), and also makes it impossible to use any of the new features of XHTML -- and if you're not using any of those, there's currently very little reason to write XHTML in the first place.
    Last edited by Twey; 09-20-2007 at 04:56 PM.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,156
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    As an example....

    It would be great if there was a tag that would automatically generate cool content. But let's say the <coolcontent> tag isn't supported in IE... or in FF, Opera, etc.
    So, since it is promising, you might be tempted to use it.

    Try it, and see what happens.

    Just insert <coolcontent> into your html. It'll be fun.

    (If you're lucky, it won't cause any errors, aside from invalidating the page, and would, hypothetically, work in that one browser it is supported in.)
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Bad example. In the case of XHTML, sending it as HTML affects all browsers, so it doesn't work in any of them. You can, e.g., check the Accept header to see if the browser supports XHTML, but due to some dubious design decisions IE claims to support everything (Accept: */*), so if you do it the proper way it won't work. This is irritating because it means that the only way to do it is to check for the explicit "application/xhtml+xml", which is bad because it means that browsers that use wildcards sensibly (e.g. application/*+xml) get the HTML content type -- and of course, you still can't use anything XHTML-specific because it won't work in the browsers that get it as HTML.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,156
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Well, it's worse then
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

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
  •