Serving XHTML documents as XHTML does weird things.

Discussion in 'Javascript' started by -Lost, Jun 18, 2007.

  1. -Lost

    -Lost Guest

    In Firefox and Safari for example, if I serve my XHTML documents as
    application/xml or xhtml+xml they only display the top inch or so of the
    document.

    In Opera it says "object has been blocked."

    In Internet Explorer of course you get total rubbish. Anything from
    "page cannot be loaded" to "403 no permission."

    The thing is, I figured the first two at least could handle it, maybe
    even Opera. I knew how IE would handle it.

    Granted, I know the caveats of using XHTML on the web, but irregardless
    I would like to know why it behaves this way.

    What makes my XHTML pages render as one to two inch strips across the
    top of the browser?

    If anyone needs an example page to inspect, let me know.

    --
    -Lost
    Remove the extra words to reply by e-mail. Don't e-mail me. I am
    kidding. No I am not.
    -Lost, Jun 18, 2007
    #1
    1. Advertising

  2. -Lost

    -Lost Guest

    -Lost wrote:
    > In Firefox and Safari for example, if I serve my XHTML documents as
    > application/xml or xhtml+xml they only display the top inch or so of the
    > document.
    >
    > In Opera it says "object has been blocked."
    >
    > In Internet Explorer of course you get total rubbish. Anything from
    > "page cannot be loaded" to "403 no permission."
    >
    > The thing is, I figured the first two at least could handle it, maybe
    > even Opera. I knew how IE would handle it.
    >
    > Granted, I know the caveats of using XHTML on the web, but irregardless
    > I would like to know why it behaves this way.
    >
    > What makes my XHTML pages render as one to two inch strips across the
    > top of the browser?
    >
    > If anyone needs an example page to inspect, let me know.


    Ugh, it just dawned on me that this is probably a purely HTML-related
    question.

    --
    -Lost
    Remove the extra words to reply by e-mail. Don't e-mail me. I am
    kidding. No I am not.
    -Lost, Jun 18, 2007
    #2
    1. Advertising

  3. -Lost

    Guest

    In IE6, sometimes, if an XHTML file has a missing tag (so that the
    page isn't actual XML) then JavaScript sometimes won't find forms
    referenced using document.myformname syntax.


    I often save my JSPs to disc and open them up in IE to confirm the XML
    is well formed.
    , Jun 18, 2007
    #3
  4. -Lost

    RobG Guest

    On Jun 19, 12:45 am, -Lost <> wrote:
    > -Lost wrote:
    > > In Firefox and Safari for example, if I serve my XHTML documents as
    > > application/xml or xhtml+xml they only display the top inch or so of the
    > > document.

    >
    > > In Opera it says "object has been blocked."

    >
    > > In Internet Explorer of course you get total rubbish. Anything from
    > > "page cannot be loaded" to "403 no permission."

    >
    > > The thing is, I figured the first two at least could handle it, maybe
    > > even Opera. I knew how IE would handle it.

    >
    > > Granted, I know the caveats of using XHTML on the web, but irregardless
    > > I would like to know why it behaves this way.

    >
    > > What makes my XHTML pages render as one to two inch strips across the
    > > top of the browser?

    >
    > > If anyone needs an example page to inspect, let me know.

    >
    > Ugh, it just dawned on me that this is probably a purely HTML-related
    > question.


    If I'd seen your post earlier I would have recommended ciah and
    provided a warning about the type of replies you might get. :)

    Despite the tone of some posters in that forum, you will usually get
    excellent advice.


    --
    Rob
    RobG, Jun 19, 2007
    #4
  5. -Lost

    -Lost Guest

    RobG wrote:
    > On Jun 19, 12:45 am, -Lost <> wrote:
    >> -Lost wrote:
    >>> In Firefox and Safari for example, if I serve my XHTML documents as
    >>> application/xml or xhtml+xml they only display the top inch or so of the
    >>> document.
    >>> In Opera it says "object has been blocked."
    >>> In Internet Explorer of course you get total rubbish. Anything from
    >>> "page cannot be loaded" to "403 no permission."
    >>> The thing is, I figured the first two at least could handle it, maybe
    >>> even Opera. I knew how IE would handle it.
    >>> Granted, I know the caveats of using XHTML on the web, but irregardless
    >>> I would like to know why it behaves this way.
    >>> What makes my XHTML pages render as one to two inch strips across the
    >>> top of the browser?
    >>> If anyone needs an example page to inspect, let me know.

    >> Ugh, it just dawned on me that this is probably a purely HTML-related
    >> question.

    >
    > If I'd seen your post earlier I would have recommended ciah and
    > provided a warning about the type of replies you might get. :)


    I appreciate it. :) I can handle Dingley, and the rest. It's Korpela
    that is the problem. Normally I bear with his crass, pedantic superiority.

    I didn't feel like it this time though. ;)

    > Despite the tone of some posters in that forum, you will usually get
    > excellent advice.


    I don't mind the tone, but being called a troll simply because I didn't
    remember 117 militant styles of posting is simply moronic.

    I am a firm believer in that you can be a genius, and still be stupid as
    hell. (Again referring to Korpela.)

    --
    -Lost
    Remove the extra words to reply by e-mail. Don't e-mail me. I am
    kidding. No I am not.
    -Lost, Jun 19, 2007
    #5
  6. -Lost

    Randy Webb Guest

    Good Man said the following on 6/18/2007 12:42 PM:
    > -Lost <> wrote in
    > news::
    >
    >> In Firefox and Safari for example, if I serve my XHTML documents as
    >> application/xml or xhtml+xml they only display the top inch or so of
    >> the document.
    >>
    >> In Opera it says "object has been blocked."
    >>
    >> In Internet Explorer of course you get total rubbish. Anything from
    >> "page cannot be loaded" to "403 no permission."
    >>
    >> The thing is, I figured the first two at least could handle it, maybe
    >> even Opera. I knew how IE would handle it.
    >>
    >> Granted, I know the caveats of using XHTML on the web, but
    >> irregardless I would like to know why it behaves this way.

    >
    > It is highly advisable to serve XHTML documents as text/html if you want
    > them to display properly in a web browser:


    Then why write XHTML if you are going to serve it as text/html and make
    the UA parse it as garbage code?

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


    META elements have absolutely nothing to do with the way a document is
    served. By the time the browser sees that tag, it is too late.

    --
    Randy
    Chance Favors The Prepared Mind
    comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
    Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
    Randy Webb, Jun 19, 2007
    #6
  7. -Lost

    Guest

    On Jun 19, 10:32 am, Good Man <> wrote:
    > Randy Webb <> wrote innews::
    >
    > >> It is highly advisable to serve XHTML documents as text/html if you want
    > >> them to display properly in a web browser:

    >
    > > Then why write XHTML if you are going to serve it as text/html and make
    > > the UA parse it as garbage code?

    >
    > Something for everyone to consider. Personally, I write it because we
    > process a lot of our pages as XML in other server-side applications
    > interacting with them.


    Not to mention that IE8 will have an XML parser. XHTML served as text/
    html is less than ideal, but it would be backwards to revert to HTML
    at this point.

    XHTML pages should render properly in FireFox and other standards-
    based browsers when served with XML MIME types. Since this is a JS
    group, it is useful to note that you cannot use document.write,
    innerHTML, etc. when serving XHTML this way.

    And since IE7 and prior versions cannot deal with XML MIME types, you
    need to check the accept header of the request before sending pages as
    anything but text/html.
    , Jun 20, 2007
    #7
  8. -Lost

    Randy Webb Guest

    said the following on 6/19/2007 8:58 PM:
    > On Jun 19, 10:32 am, Good Man <> wrote:
    >> Randy Webb <> wrote innews::
    >>
    >>>> It is highly advisable to serve XHTML documents as text/html if you want
    >>>> them to display properly in a web browser:
    >>> Then why write XHTML if you are going to serve it as text/html and make
    >>> the UA parse it as garbage code?

    >> Something for everyone to consider. Personally, I write it because we
    >> process a lot of our pages as XML in other server-side applications
    >> interacting with them.

    >
    > Not to mention that IE8 will have an XML parser.


    That is what they said about IE7 as well. And since it took 8 years to
    get IE7 out, then IE might support it in 2020.

    > XHTML served as text/html is less than ideal,


    XHTML served as text/html is wasted time and effort.

    > but it would be backwards to revert to HTML at this point.


    Nobody said anything about going backwards. HTML is current and nothing
    about is "backwards". And to call it "backwards" is plain wrong. XHMTL
    on the web, in 2007, is what is "wrong".

    --
    Randy
    Chance Favors The Prepared Mind
    comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
    Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
    Randy Webb, Jun 20, 2007
    #8
    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. phil
    Replies:
    13
    Views:
    630
    derek giroulle
    Jun 29, 2004
  2. Replies:
    31
    Views:
    1,049
    Geoff Berrow
    Jul 22, 2006
  3. Replies:
    1
    Views:
    469
    Juan T. Llibre
    Oct 18, 2006
  4. =?Utf-8?B?V2lsbGlhbSBTdWxsaXZhbg==?=

    vs2005 publish website doing bad things, bad things

    =?Utf-8?B?V2lsbGlhbSBTdWxsaXZhbg==?=, Oct 25, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    585
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Oct 25, 2006
  5. Replies:
    1
    Views:
    93
Loading...

Share This Page