W3C home > Mailing lists > Public > www-html@w3.org > August 2006

Re: XHTML Applications and XML Processors [was Re: xhtml 2.0 noscript]

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 03 Aug 2006 05:42:49 +0200
To: "John Foliot - WATS.ca" <foliot@wats.ca>
Cc: <www-html@w3.org>
Message-ID: <u3r2d25ff58dnd9uighs3jfuajlomtml3q@hive.bjoern.hoehrmann.de>

* John Foliot - WATS.ca wrote:
>OK, and this is where I am confused - you are advocating the ability for
>scripts to fire in mid-stream or certain user-groups are "harmed".  How
>are they harmed - exactly? (And please do excuse the fact that at some
>levels this is technical above my head, but I am following).  

You have a XHTML document like

  ...
  <script>...</script>
  ...
  <body>
    <p>...<a onclick="return example();" ...
    <p>... 50 KB additional content ...

The user just wants to use whatever functionality associated to the link
and the browser will encounter the first paragraph, render the link, and
then continue loading the rest of the document. The author ensured that
the example() function does not depend on anything that comes after the
first link. As implemented in all mainstream browsers, the user can just
click the link as soon as he can see it.

With Mark's processing model, the user will have to wait until after the
browser downloaded the whole document. If the browser renders the link,
but does not allow to click it, users will be confused. If it allows it
to be clicked, the link will not work. If it does not render the link
until the document is fully downloaded, users will be annoyed. This is a
serious regression for users regardless of how the model is actually im-
plemented.

Mark's only argument in favour of his processing model is that, if the
example() function does depend on how much of what comes after the link
is already loaded, there may be differences in how the script behaves:
e.g., the script might add some element at the end of the <body> which
has not been encountered by the browser, so the end might be anywhere
between the link and the actual end of the <body>, so it is inserted at
some "random" position, which is not desirable.

Authors can easily work around problems of this kind, which means such
a processing model brings very little benefit at serious cost.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Thursday, 3 August 2006 03:49:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:07 GMT