<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Javascript Load Order with Defer Attribute</title>
	<atom:link href="http://scott.yang.id.au/2003/07/javascript-load-order-with-defer-attribute/feed/" rel="self" type="application/rss+xml" />
	<link>http://scott.yang.id.au/2003/07/javascript-load-order-with-defer-attribute/</link>
	<description>Faith, Technology and Randomness in Life, According to Scott</description>
	<lastBuildDate>Wed, 08 Feb 2012 13:17:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: no.connexion</title>
		<link>http://scott.yang.id.au/2003/07/javascript-load-order-with-defer-attribute/#comment-93039</link>
		<dc:creator>no.connexion</dc:creator>
		<pubDate>Mon, 05 May 2008 16:59:32 +0000</pubDate>
		<guid isPermaLink="false">http://scott.yang.id.au/2003/07/javascript-load-order-with-defer-attribute/#comment-93039</guid>
		<description>Actually the correct procedure is defer=&quot;defer&quot; and mozilla based browsers will not accept this (and/or just ignore it) but in IE this JS attribute will execute the javascript INLINE or EXTERNAL only AFTER the page finisged loading.

Some links regarding this matter:
https://bugzilla.mozilla.org/show_bug.cgi?id=28293
http://www.hunlock.com/blogs/Deferred_Javascript</description>
		<content:encoded><![CDATA[<p>Actually the correct procedure is defer=&#8221;defer&#8221; and mozilla based browsers will not accept this (and/or just ignore it) but in IE this JS attribute will execute the javascript INLINE or EXTERNAL only AFTER the page finisged loading.</p>
<p>Some links regarding this matter:<br />
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=28293" rel="nofollow">https://bugzilla.mozilla.org/show_bug.cgi?id=28293</a><br />
<a href="http://www.hunlock.com/blogs/Deferred_Javascript" rel="nofollow">http://www.hunlock.com/blogs/Deferred_Javascript</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: y2kprabu</title>
		<link>http://scott.yang.id.au/2003/07/javascript-load-order-with-defer-attribute/#comment-10884</link>
		<dc:creator>y2kprabu</dc:creator>
		<pubDate>Fri, 08 Apr 2005 18:39:41 +0000</pubDate>
		<guid isPermaLink="false">http://scott.yang.id.au/2003/07/javascript-load-order-with-defer-attribute/#comment-10884</guid>
		<description>Great Discovery man...
i got to know that IE defers javascript only when the script is externaly linked
good work</description>
		<content:encoded><![CDATA[<p>Great Discovery man&#8230;<br />
i got to know that IE defers javascript only when the script is externaly linked<br />
good work</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Toby Inkster</title>
		<link>http://scott.yang.id.au/2003/07/javascript-load-order-with-defer-attribute/#comment-352</link>
		<dc:creator>Toby Inkster</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://scott.yang.id.au/2003/07/javascript-load-order-with-defer-attribute/#comment-352</guid>
		<description>Mozilla might behave better if you were to use the more proper defer=&quot;defer&quot; rather than defer=&quot;true&quot;.</description>
		<content:encoded><![CDATA[<p>Mozilla might behave better if you were to use the more proper defer=&#8221;defer&#8221; rather than defer=&#8221;true&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Benoit</title>
		<link>http://scott.yang.id.au/2003/07/javascript-load-order-with-defer-attribute/#comment-353</link>
		<dc:creator>Peter Benoit</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://scott.yang.id.au/2003/07/javascript-load-order-with-defer-attribute/#comment-353</guid>
		<description>More proper?  How do you figure?  The defer attribute looks for a boolean; you know, yes/no, true/false, 1/0.  You do understand that concept right?  

Here&#039;s some W3C for you, Mozilla boy.

defer [CI] 
When set, this boolean attribute provides a hint to the user agent that the script is not going to generate any document content (e.g., no &quot;document.write&quot; in javascript) and thus, the user agent can continue parsing and rendering.</description>
		<content:encoded><![CDATA[<p>More proper?  How do you figure?  The defer attribute looks for a boolean; you know, yes/no, true/false, 1/0.  You do understand that concept right?  </p>
<p>Here&#8217;s some W3C for you, Mozilla boy.</p>
<p>defer [CI]<br />
When set, this boolean attribute provides a hint to the user agent that the script is not going to generate any document content (e.g., no &#8220;document.write&#8221; in javascript) and thus, the user agent can continue parsing and rendering.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil Frost</title>
		<link>http://scott.yang.id.au/2003/07/javascript-load-order-with-defer-attribute/#comment-354</link>
		<dc:creator>Phil Frost</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://scott.yang.id.au/2003/07/javascript-load-order-with-defer-attribute/#comment-354</guid>
		<description>actually, defer=&quot;true&quot; is quite wrong, as stated in the DTD and by the validator:

HTML 4.01 DTD:

&lt;code&gt;&lt;!ATTLIST SCRIPT
  charset     %Charset;      #IMPLIED  -- char encoding of linked resource --
  type        %ContentType;  #REQUIRED -- content type of script language --
  src         %URI;          #IMPLIED  -- URI for an external script --
  defer       (defer)        #IMPLIED  -- UA may defer execution of script --
  event       CDATA          #IMPLIED  -- reserved for possible future use --
  for         %URI;          #IMPLIED  -- reserved for possible future use --
  &gt;&lt;/code&gt;

HTML validator output:

Line 15, column 48:  value of attribute &quot;DEFER&quot; cannot be &quot;TRUE&quot;; must be one of &quot;DEFER&quot;  (explain...).

&lt;code&gt;        &lt;script type=&quot;text/javascript&quot; defer=&quot;true&quot;&gt;&lt;/code&gt;

That said, the HTML 4.01 standard does not explicitly state a behavior, and does not require the user agent to recognize the attribute:

&quot;When set, this boolean attribute provides a hint to the user agent that the script is not going to generate any document content (e.g., no &quot;document.write&quot; in javascript) and thus, the user agent can continue parsing and rendering.&quot;

This is a poor specification, because an ambigious load order will cause problems if there are interdependencies between the script elements.</description>
		<content:encoded><![CDATA[<p>actually, defer=&#8221;true&#8221; is quite wrong, as stated in the DTD and by the validator:</p>
<p>HTML 4.01 DTD:</p>
<p><code>&lt;!ATTLIST SCRIPT<br />
  charset     %Charset;      #IMPLIED  -- char encoding of linked resource --<br />
  type        %ContentType;  #REQUIRED -- content type of script language --<br />
  src         %URI;          #IMPLIED  -- URI for an external script --<br />
  defer       (defer)        #IMPLIED  -- UA may defer execution of script --<br />
  event       CDATA          #IMPLIED  -- reserved for possible future use --<br />
  for         %URI;          #IMPLIED  -- reserved for possible future use --<br />
  &gt;</code></p>
<p>HTML validator output:</p>
<p>Line 15, column 48:  value of attribute &#8220;DEFER&#8221; cannot be &#8220;TRUE&#8221;; must be one of &#8220;DEFER&#8221;  (explain&#8230;).</p>
<p><code>        &lt;script type="text/javascript" defer="true"&gt;</code></p>
<p>That said, the HTML 4.01 standard does not explicitly state a behavior, and does not require the user agent to recognize the attribute:</p>
<p>&#8220;When set, this boolean attribute provides a hint to the user agent that the script is not going to generate any document content (e.g., no &#8220;document.write&#8221; in javascript) and thus, the user agent can continue parsing and rendering.&#8221;</p>
<p>This is a poor specification, because an ambigious load order will cause problems if there are interdependencies between the script elements.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hakan M</title>
		<link>http://scott.yang.id.au/2003/07/javascript-load-order-with-defer-attribute/#comment-355</link>
		<dc:creator>Hakan M</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://scott.yang.id.au/2003/07/javascript-load-order-with-defer-attribute/#comment-355</guid>
		<description>&gt; More proper? How do you figure? The defer attribute
&gt; looks for a boolean; you know, yes/no, true/false,
&gt; 1/0. You do understand that concept right?

Great to see a complete idiot trying to talk smart and then find a correction right below it. The boolean operation is evaluated on the presence of a defer-attribute, meaning you can pretty much put anything as a value. It&#039;s not evaluated by the string (&quot;true&quot;) in your value, since that is a STRING.

The fact that you use a value at all is that XHTML does not allow properties without values on elements, same thing with  and so on.

YOU do understand the concept, right?
</description>
		<content:encoded><![CDATA[<p>> More proper? How do you figure? The defer attribute<br />
> looks for a boolean; you know, yes/no, true/false,<br />
> 1/0. You do understand that concept right?</p>
<p>Great to see a complete idiot trying to talk smart and then find a correction right below it. The boolean operation is evaluated on the presence of a defer-attribute, meaning you can pretty much put anything as a value. It&#8217;s not evaluated by the string (&#8220;true&#8221;) in your value, since that is a STRING.</p>
<p>The fact that you use a value at all is that XHTML does not allow properties without values on elements, same thing with  and so on.</p>
<p>YOU do understand the concept, right?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

