473,573 Members | 2,829 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

application/xhtml+xml in IE

I just read this article from today:

http://webstandards.org/buzz/archive/2005_09.html

I need some help understanding this sentense:

The W3C recommends XHTML 1.1 should be served with the
application/xhtml+xml MIME type, something that Internet
Explorer does not currently support.

I thought it was the web *server* that serves documents in a certain
MIME type, not the web *browser*. I don't see why it matters whether IE
*knows* it's dealing with XHTML as long as the page is valid, is served
with a correct Content-Type header, and displayed correctly in the browser.

Gustaf
Sep 1 '05 #1
23 4240
Gustaf wrote:
I just read this article from today:

http://webstandards.org/buzz/archive/2005_09.html

I need some help understanding this sentense:

The W3C recommends XHTML 1.1 should be served with the
application/xhtml+xml MIME type, something that Internet
Explorer does not currently support.

I thought it was the web *server* that serves documents in a certain
MIME type, not the web *browser*. I don't see why it matters whether IE
*knows* it's dealing with XHTML as long as the page is valid, is served
with a correct Content-Type header, and displayed correctly in the
browser.


It certainly matters, if the document is not displayed at all ;)

IE does not recognize documents *served* as application/xhtml+xml as a
document it could display. It will popup a 'Save as..', 'Open with..' or
dunno dialog, if you try to load such a document. And a XHTML 1.1 document
is not valid, if it is served as text/html - the only MIME type IE
understands (for displaying (X)HTML documents).

Serving XHTML 1.0 as text/html is valid and advocated by the W3C as a
temporary workaround, but many people (including me) think that this is an
ugly, unnecessary hack that should be avoided. XHTML 1.0 has no added value
over HTML 4.01, especially if served as text/html.

--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/
Sep 1 '05 #2
Benjamin Niemann wrote:
IE does not recognize documents *served* as application/xhtml+xml as a
document it could display. It will popup a 'Save as..', 'Open with..' or
dunno dialog, if you try to load such a document.


That's strange. I started to make the switch to XHTML 1.1, and I have no
problem in IE6 on Windows XP SP2. Maybe the problem you mention occurs
in IE5 (which is bad enough). Can anyone confirm this? I saw that IE6
doesn't include "applicatio n/xhtml+xml" in the "Accept" HTTP header in
the request, but the page still renders properly. Maybe it shouldn't.

For those interested, I wrote a bit on how to write conformant XHTML 1.1
documents (the URL is temporary). Enjoy. :-)

http://gusgus.cn/www/xhtml/authoringxhtml11.html

It looks identical IE and Firefox. In Opera, the <pre> elements are
displayed in a smaller font.

Gustaf
Sep 1 '05 #3
Gustaf <gu*****@algone t.se> wrote:
For those interested, I wrote a bit on how to write conformant XHTML 1.1
documents (the URL is temporary). Enjoy. :-)

http://gusgus.cn/www/xhtml/authoringxhtml11.html

It looks identical IE and Firefox. In Opera, the <pre> elements are
displayed in a smaller font.


Interesting. My copy of MSIE renders it as

File Download

You have chosen to download a file from this location.

authoringxhtml1 1.html from gusgus.cn

What would you like to do with this file?
( ) Open this file from its current location
(*) Save this file to disk

[OK] [Cancel] [More Info]

If I select "Open this file from its current location", then calls Opera to
display the file.
--
Darin McGrew, mc****@stanford alumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp. com, http://www.HTMLHelp.com/

"I used to have a handle on life, but it broke."
Sep 1 '05 #4
On Thu, 1 Sep 2005, Darin McGrew wrote:
Gustaf <gu*****@algone t.se> wrote:

http://gusgus.cn/www/xhtml/authoringxhtml11.html
Interesting. My copy of MSIE renders it as

File Download

[...] ( ) Open this file from its current location [...]

Yup, back with Win/NT4 I configured IE to to use Mozilla to open this
content-type ...
If I select "Open this file from its current location", then calls
Opera to display the file.


I've no argument with that...

But interestingly, if I try to use MSIE to access the above URL, I get
an alert saying "Your current security settings do not allow this file
to be downloaded".

MSIE always seems to have a new trick up its sleeve.

Maybe you haven't applied the latest MS security fixes? :-}
Sep 1 '05 #5
Gustaf <gu*****@algone t.se> wrote:
Benjamin Niemann wrote:
IE does not recognize documents *served* as application/xhtml+xml as a
document it could display. It will popup a 'Save as..', 'Open with..' or
dunno dialog, if you try to load such a document.
That's strange. I started to make the switch to XHTML 1.1, and I have no
problem in IE6 on Windows XP SP2. Maybe the problem you mention occurs
in IE5 (which is bad enough).


No, it occurs on IE6 as well.
I saw that IE6
doesn't include "applicatio n/xhtml+xml" in the "Accept" HTTP header in
the request, but the page still renders properly.
IE6 does not explicitly mention application/xhtml+xml but it includes */*,
which means "anything goes".
http://gusgus.cn/www/xhtml/authoringxhtml11.html

It looks identical IE and Firefox.


Not here. I don't know what is going on, but on IE6 I see a dialog pop up,
then vanish, and the page opens in the browser _but_ with no CSS effects
and with no images, apparently because the browser shows a copy that it has
stored in the Temporary Internet Files folder.

I don't know a way to check what a server sends to IE6 specifically. It
could be something different from what one gets by just talking to the
server at port 80: the response is something like

HTTP/1.1 200 OK
Date: Thu, 01 Sep 2005 22:11:04 GMT
Server: Apache/1.3.33 (Unix) mod_ssl/2.8.22 OpenSSL/0.9.7e PHP/4.4.0
Last-Modified: Tue, 30 Aug 2005 16:22:23 GMT
ETag: "4bfc82-1a71-431487bf"
Accept-Ranges: bytes
Content-Length: 6769
Content-Type: application/xhtml+xml; charset=utf-8

That looks pretty normal, and essentially the same as for XHTML files that
IE6 refuses to open.

But now I notice that if I use the filename suffix .html for an XHTML file,
then I get the same reaction from IE6 as with your document. It seems that
IE6 (on my system at least) automagically downloads the file and opens it
in the browser - but from the temporary folder

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Sep 1 '05 #6
Jukka K. Korpela wrote:
IE6 does not explicitly mention application/xhtml+xml but it includes */*,
which means "anything goes".
Yes, I noticed. My guess is that resources fetched as */* triggers the
File Download dialog. But I still don't understand why I can browse
pages served as "applicatio n/xhtml+xml" in IE6. Am I really alone about
this?

My Windows is fully updated. My version of IE is:

6.0.2900.2180.x psp_sp2_gdr.050 301-1519
But now I notice that if I use the filename suffix .html for an XHTML file,
then I get the same reaction from IE6 as with your document.


If I use an .xhtml suffix, I get the File Download dialog, like the
others here. (There's a copy of the same document with an .xhtml suffix
at the same place now.)

Gustaf
Sep 2 '05 #7
Alan J. Flavell wrote:
interestingly, if I try to use MSIE to access the above URL, I get an
alert saying "Your current security settings do not allow this file
to be downloaded".

MSIE always seems to have a new trick up its sleeve.

Maybe you haven't applied the latest MS security fixes? :-}


:-D That was just plain mean. And rather funny, too. Thanks for that.

--
Brian
Sep 2 '05 #8
In article <0Y************ ********@gigane ws.com>,
Gustaf <gu*****@algone t.se> wrote:
But I still don't understand why I can browse
pages served as "applicatio n/xhtml+xml" in IE6. Am I really alone about
this?


Do you have the MathPlayer plug-in installed? Or have you tweaked the
registry manually so that application/xhtml+xml becomes an alias for
text/html?

--
Henri Sivonen
hs******@iki.fi
http://hsivonen.iki.fi/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
Sep 2 '05 #9
Gustaf wrote:
But I still don't understand why I can browse
pages served as "applicatio n/xhtml+xml" in IE6. Am I really alone about
this?


No, you aren't. Now testing on Win XP SP 2, using IE 6 to access
http://gusgus.cn/www/xhtml/authoringxhtml11.html
opens your document as intended, with styles and images. However, on the
status line I see, for a short time, a message about _loading_ a file,
i.e. a message I don't normally see when accessing a web page.

If I try to access
http://gusgus.cn/www/xhtml/authoringxhtml11.xhtml
I get the dialog. This seems to be the same as your experience.

My conjecture is that IE 6 (on XP) first recognizes the document as
being of an unknown application type (from the HTTP headers, since IE 6
does not grok application/xhtml+xml). Then, after downloading it, it
starts to wonder what to do with it. It uses its usual suffix sniffing
and decides that .html means it's HTML (good old HTML) after all, and
automagically opens it in the browser window - whereas .xhtml is Greek
to it, at least by default.

I guess if I played with the filename suffix association settings in
Windows, IE 6 might open even URLs ending with .xhtml as (good old) HTML
documents. I'm not particularly interested in messing around that,
though, and it wouldn't really be that relevant to HTML authoring for
the WWW - we can't expect users to play such games just to see our
glorious XHTML documents rendered by HTML rules.
Sep 2 '05 #10

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

Similar topics

10
3759
by: Ian Rastall | last post by:
I get the feeling this was just discussed, so sorry if this is redundant. I want to make my books site XHTML Basic, so it will look good on PDA's. Not knowing what to do, I simply switched DTD's, and tried to validate it at the W3C. It *almost* validated. The main things it didn't like (aside from inline style declarations) were the...
3
1612
by: Robin Haswell | last post by:
Hey guys I'm currently screenscraping some Swedish site, and i need a method to convert XML entities (&amp; etc, plus d etc) to Unicode characters. I'm sure one of python's myriad of XML processors can do this but I can't find which one. Can anyone make any suggestions? Thanks
6
2058
by: Andreas Prilop | last post by:
It seems that Google is unable to "recognize" application/xhtml+xml: http://google.com/search?q=www.unics.uni-hannover.de/nhtcapri/ruby-annotation.x.html "File Format: Unrecognized" Then follow the link "View as HTML" to http://google.com/search?q=cache:www.unics.uni-hannover.de/nhtcapri/ruby-annotation.x.html and look at the source text...
43
3116
by: Christoph Schneegans | last post by:
Hi! Okay, so positions on "text/html" XHTML are totally contradicting. Anyway! I hope there's more consensus about "application/xml" XHTML. I've recently learned that Opera 9.0b2 does not only evaluate HTTP header, BOM and XML declaration to determine the character encoding of an XHTML document sent as "application/xml", but also the...
15
4329
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 lines: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="curseIE.xsl"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0...
1
1456
by: Guramrit Singh | last post by:
Hi everybody, I'm having problem with MicrosoftAjax, when my application is in XHTML+XML mode. I'd set contenttype of page to application/xhtml+xml. but in this case ajax doesn't work properly. since the result returned from webservice ScriptMethod is json. xhtml doesn't handle it properly. I'm encountering some problems with updatepanel...
0
7699
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8202
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7788
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8066
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5594
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5292
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3733
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3733
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2216
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.