Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion XHTML 1.0 / 1.1 / 2.0
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Richard Cornford  
View profile  
 More options Sep 17 2005, 10:24 am
Newsgroups: comp.infosystems.www.authoring.html
From: "Richard Cornford" <Rich...@litotes.demon.co.uk>
Date: Sat, 17 Sep 2005 15:24:36 +0100
Local: Sat, Sep 17 2005 10:24 am
Subject: Re: XHTML 1.0 / 1.1 / 2.0

Spartanicus wrote:
> Toby Inkster wrote:
<snip>
>>I would only advocate sending "Content-Type: text/html" to
>>agents that don't announce that they support XML via the
>>Accept header.

Don't current Opera versions announce that they support XHTML while
stating a preference for HTML? Shouldn't sensible content negotiation
only send XHTML in place of HTML when the UA expresses both support for
it _and_ a preference for receiving it?

> Content negotiation comes with it's own risks and issues.
> We know about IE's broken accept string, and we can work
> around it. But who's to say that there aren't any other
> clients with incorrect accept values? There is the server
> overhead to consider, and the potential cache issues.

The notion that you can write static pages in Appendix C-style XHTML and
use content negotiation to decide which content-type header to send with
them really stands a very good chance of coming unstuck whenever there
is an intention to script those pages. A SCRIPT element in a static page
can only reference one URL but a browser receiving an HTML content type
will create an HTML DOM to be scripted and a browser receiving an XHTML
content-type will create an XHTML DOM to be scripted.

The single script file referenced from a static URL in the page will
struggle to accommodate both DOM types (as they need to be scripted very
differently). It is much less trouble (and probably about equivalent
work) to create two script resources, one for each DOM type, and serve
HTML DOM scripts to pages that have been served as HTML content types,
and XHTML DOM scripts to pages served as XHTML content types.
Unfortunately there is little reason to expect a browser's request for a
script to contain information that could be used to negotiate which
style of script to send (a script is a script, is a script, whichever
type of DOM is trying to load it). So serving scripts depending on which
content type you previously sent with the page that wants to load the
script becomes a problem.

Session tracking could be used; remembering which content-type was sent
with the page and then sending a particular script version when the
request came back for the script in the same session. Session tracking
by URL re-writing would impact on the client-side caching of the script
(and you would normally want scripts cached on the client if possible)
and cookie-based session tracking might result in intermediate caches
serving the wrong script type to some users.

And the alternative is:-

> If content negotiation is to be used at all, then it's a
> small step to generate HTML from the XHTML and feed that
> to clients who want HTML.

- in which you use an explicitly different script URL with each type of
mark-up. It can be served from a cache if available with out any risk of
getting the wrong script for the DOM type being scripted, and without
requiring any additional effort to mach script requests with previous
page requests.

But what has been done here? A requirement to provide essentially static
marked-up content with a script now involves dynamically generating (or
pre-processing two versions of) the pages, writing/testing two versions
of the same script and including server-side scripts (or a considerably
more involved server configuration)(with an inevitable increase in
server load) just to make it possible to serve the same content as HTML
and XHTML, with no perceivable difference to the user's experience of
the results. And that is assuming that all the added complexity works
the way it was intended 100% of the time.

So, we can content negotiate but what is the reward for all of that
extra trouble and expense?

Richard.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.