Serving XHTML documents as XHTML does weird things.

L

-Lost

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.
 
L

-Lost

-Lost said:
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.
 
G

gimme_this_gimme_that

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.
 
R

RobG

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.
 
L

-Lost

RobG said:
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.)
 
R

Randy Webb

Good Man said the following on 6/18/2007 12:42 PM:
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.
 
D

dmark

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.
 
R

Randy Webb

(e-mail address removed) said the following on 6/19/2007 8:58 PM:
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".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top