HighDots Forums  

Advice on Reference Book

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss Advice on Reference Book in the HTML forum.



Reply
 
Thread Tools Display Modes
  #31  
Old   
Andreas Prilop
 
Posts: n/a

Default Re: Advice on Reference Book - 10-21-2009 , 10:27 AM






On Tue, 20 Oct 2009, Sherm Pendley wrote:

Quote:
You cannot "indicate a preference for XHTML" but only for
"Content-Type: application/xhtml+xml" or for
"Content-Type: text/html", etc.

That's in the response header. The Accept header to which John refers
is sent by the browser as part of the request.
And this Accept header can prefer "application/xhtml+xml" over
"text/html" but not "XHTML" over "HTML".

Quote:
You can then serve XHTML with "Content-Type: text/html".

Which results in IE using quirks mode when it finds the XHTML doctype.
No. Internet Explorer goes into quirks mode when you include the line
<?xml version="1.0"?>
at the beginning but not with XHTML in general.

--
In memoriam Alan J. Flavell
http://www.alanflavell.org.uk/charset/

Reply With Quote
  #32  
Old   
John Dunlop
 
Posts: n/a

Default Re: Advice on Reference Book - 10-21-2009 , 11:55 AM






Andreas Prilop:

Quote:
Yes - you should distinguish between "application/xhtml+xml"
and "XHTML".
Yes, you're right. I should have written "application/xhtml+xml".

--
John

Reply With Quote
  #33  
Old   
John Dunlop
 
Posts: n/a

Default Re: Advice on Reference Book - 10-21-2009 , 11:56 AM



Jonathan N. Little:

Quote:
See the articles to understand the consequences of serving XHTMLto IE as
text/html and application/xhtml+xml to others
No one has suggested serving XHTML to particular browsers or as text/html.
I meant that one could serve XHTML as application/xhtml+xml to any browser
that indicates a preference for that MIME type.

--
John

Reply With Quote
  #34  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Advice on Reference Book - 10-21-2009 , 09:04 PM



John Dunlop wrote:
Quote:
Jonathan N. Little:

See the articles to understand the consequences of serving XHTMLto IE as
text/html and application/xhtml+xml to others

No one has suggested serving XHTML to particular browsers or as text/html.
I meant that one could serve XHTML as application/xhtml+xml to any browser
that indicates a preference for that MIME type.

But are you not? IE will not accept application/xhtml+xml, so you
either have to serve it for *that* browser as text/html or present IE
users with a download dialog!

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Reply With Quote
  #35  
Old   
Eric
 
Posts: n/a

Default Re: Advice on Reference Book - 10-21-2009 , 09:52 PM



In article <pan.2009.10.19.09.03.58.697353 (AT) john (DOT) dunlop.name>,
John Dunlop <john (AT) dunlop (DOT) name> wrote:

Quote:
Eric:

It is however a bit hard to seriously suggest XHTML for any web site you
want most people to read.

You could, if you're hell-bent on XHTML, serve it to browsers that Accept
it and HTML to the rest.
Thanks to every browser lying about which browser they are, browser
sniffing is futile (or at least fraught).

However content negotiation also fails, as Internet Explorer is one of
the browsers that claims it accepts pretty much anything. IE is the
village idiot of web browsers.

Except for an index.html, I now do several web sites entirely in xhtml,
served correctly (default settings in Apache actually). IE is not my 800
pound gorilla. I do not actually know whether any other browsers fall
over (Chrome, Firefox, Opera and Safari are all fine, even on mobile
versions). Not something you want to do on a commercial site.

Reply With Quote
  #36  
Old   
John Dunlop
 
Posts: n/a

Default Re: Advice on Reference Book - 10-22-2009 , 05:46 AM



Jonathan N. Little:

Quote:
IE will not accept application/xhtml+xml,
in which case it would get HTML.

--
John

Reply With Quote
  #37  
Old   
John Dunlop
 
Posts: n/a

Default Re: Advice on Reference Book - 10-22-2009 , 05:46 AM



Eric:

Quote:
However content negotiation also fails, as Internet Explorer is one of
the browsers that claims it accepts pretty much anything.
If Internet Explorer gives text/html a higher quality value than it does
application/xhtml+xml or */*, it would get HTML. Even if text/html and */*
have equal quality values, you could default to text/html. Or you could
just serve XHTML to browsers that explicitly specify application/xhtml+xml
(I take it IE doesn't do that!?). Or you could ignore my throwaway remark
and just serve HTML. :-)

--
John

Reply With Quote
  #38  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Advice on Reference Book - 10-22-2009 , 06:58 AM



John Dunlop wrote:
Quote:
Jonathan N. Little:

IE will not accept application/xhtml+xml,

in which case it would get HTML.

Bad HTML.

Google "tag soup"

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Reply With Quote
  #39  
Old   
John Dunlop
 
Posts: n/a

Default Re: Advice on Reference Book - 10-22-2009 , 07:11 AM



Jonathan N. Little:

Quote:
Google "tag soup"
I don't see what tag soup has to do with the price of fish.

--
John

Reply With Quote
  #40  
Old   
Eric
 
Posts: n/a

Default Re: Advice on Reference Book - 10-22-2009 , 08:24 AM



In article <pan.2009.10.22.09.46.29.516139 (AT) john (DOT) dunlop.name>,
John Dunlop <john (AT) dunlop (DOT) name> wrote:

Quote:
Eric:

However content negotiation also fails, as Internet Explorer is one of
the browsers that claims it accepts pretty much anything.

If Internet Explorer gives text/html a higher quality value than it does
application/xhtml+xml or */*, it would get HTML. Even if text/html and */*
have equal quality values, you could default to text/html. Or you could
just serve XHTML to browsers that explicitly specify application/xhtml+xml
(I take it IE doesn't do that!?). Or you could ignore my throwaway remark
and just serve HTML. :-)
http://www.newmediacampaigns.com/page/browser-rest-http-accept-headers
Internet Explorer 8

Accept: image/jpeg, application/x-ms-application, image/gif,
application/xaml+xml, image/pjpeg, application/x-ms-xbap,
application/x-shockwave-flash, application/msword, */*

or if Windows has MS Office installed, then
Accept: image/gif, image/jpeg, image/pjpeg, application/x-ms-application,
application/vnd.ms-xpsdocument, application/xaml+xml,
application/x-ms-xbap, application/x-shockwave-flash,
application/x-silverlight-2-b2, application/x-silverlight,
application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/msword, */*

However on a page refresh, IE will probably send only */*
http://blogs.msdn.com/ieinternals/archive/2009/07/01/9811694.aspx

Like I said, Internet Explorer is the village idiot of web browsers.

It is not my job to fix up Microsoft's errors when serving web pages.
These problems have been brought to their attention.

It is also not my job to rewrite Apache defaults when their defaults are
correct.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.