java判断手机application/xhtml+xml,IE中的application / xhtml + xml

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

解决方案

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/

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 "application/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

 elements are

displayed in a smaller font.

Gustaf

Gustaf 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

 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.

authoringxhtml11.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****@stanfordalumni.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."

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值