473,379 Members | 1,270 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Serving XHTML documents as XHTML does weird things.

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.
Jun 18 '07 #1
9 1340
-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.
Jun 18 '07 #2
-Lost <ma****************@techie.comwrote in
news:VY******************************@comcast.com:
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:

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

Also see these pages:
http://www.w3.org/2003/01/xhtml-mime...nt-negotiation
http://keystonewebsites.com/articles/mime_type.php
http://www.xml.com/pub/a/2003/03/19/dive-into-xml.html
http://www.webmasterworld.com/forum21/11193.htm
http://en.wikipedia.org/wiki/Quirks_mode
http://www.quirksmode.org/about/quirksmode.html

Jun 18 '07 #3
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 '07 #4
On Jun 19, 12:45 am, -Lost <maventheextrawo...@techie.comwrote:
-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
Jun 18 '07 #5
RobG wrote:
On Jun 19, 12:45 am, -Lost <maventheextrawo...@techie.comwrote:
>-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.
Jun 19 '07 #6
Good Man said the following on 6/18/2007 12:42 PM:
-Lost <ma****************@techie.comwrote in
news:VY******************************@comcast.com:
>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/
Jun 19 '07 #7
Randy Webb <Hi************@aol.comwrote in
news:6L********************@telcove.net:
>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.

Jun 19 '07 #8
On Jun 19, 10:32 am, Good Man <h...@letsgo.comwrote:
Randy Webb <HikksNotAtH...@aol.comwrote innews:6L********************@telcove.net:
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 '07 #9
dm***@cinsoft.net said the following on 6/19/2007 8:58 PM:
On Jun 19, 10:32 am, Good Man <h...@letsgo.comwrote:
>Randy Webb <HikksNotAtH...@aol.comwrote innews:6L********************@telcove.net:
>>>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/
Jun 20 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Peter C. Chapin | last post by:
I have a need to include Greek letters in some of my XML documents (the documents contain astronomical information and many stars are named using Greek letters). Following some earlier postings on...
30
by: Patrick | last post by:
Hello, i'm trying to get my page to XHTML 1.1 compliance, i used the validator from validator.w3.org but i still get one error message which i cant explain. Would be nice if someone can take a...
10
by: oopaevah | last post by:
When using innerHTML to insert xhtml IE5+ mangles the xhtml completely. For example it removes the quotes from attributes. It also does other ridiculous things like on a <div> it will insert the...
2
by: mike | last post by:
regards: I follow the following steps to converting from HTML to XHTML http://webpageworkshop.co.uk/main/xhtml_converting My parser is http://htmlparser.sourceforge.net/ Xhtml version is 1.0...
16
by: Mcginkel | last post by:
I am trying to find a way to load XHTML content in an Iframe. I use to do this in html by using the following code : var iframeObject = document.createElement("iframe");...
9
by: anupamjain | last post by:
Hi, After 2 weeks of search/hit-and-trial I finally thought to revert to the group to find solution to my problem.(something I should have done much earlier) This is the deal : On a JSP...
30
by: abracad_1999 | last post by:
Is it possible to serve valid xhtml with php? xhtml requires the 1st line: <?xml version="1.0" encoding="iso-8859-1"?> But php interprets the opening <? as a php statement. If I try to echo...
15
by: Zhang Weiwu | last post by:
http://www.w3.org/MarkUp/2004/xhtml-faq provided a trick to serve xhtml webpage to IE as application/xml I used that trick and now every one of my xhtml webpage have following first 4 starting...
12
by: -Lost | last post by:
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."...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.