<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sleepiness in Seattle &#187; defer</title>
	<atom:link href="http://stanblog.jojoyao.com/tag/defer/feed/" rel="self" type="application/rss+xml" />
	<link>http://stanblog.jojoyao.com</link>
	<description>Stanley&#039;s Chat on the Technology and Business</description>
	<lastBuildDate>Tue, 21 Apr 2009 04:29:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Mysterious JavaScript function call failure and loading optimization</title>
		<link>http://stanblog.jojoyao.com/2007/01/mysterious-javascript-function-call-failure-and-loading-optimization/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mysterious-javascript-function-call-failure-and-loading-optimization</link>
		<comments>http://stanblog.jojoyao.com/2007/01/mysterious-javascript-function-call-failure-and-loading-optimization/#comments</comments>
		<pubDate>Sun, 21 Jan 2007 18:57:40 +0000</pubDate>
		<dc:creator>Stanley Yao</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[defer]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://stanblog.jojoyao.com/newblog/?p=8</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><a title="Optimize Your Scripts in DHTML Using the DEFER Attribute" href="http://www.devx.com/tips/Tip/13082">Optimize Your Scripts in DHTML Using the DEFER Attribute</a> </p>
<p>When, for example, a perfect JavaScript function call foo() with the correct syntax is always mysteriously ignored, watch out for the side effect of script loading optimization.  The root cause turned out to be that the script that contains the foo() function is loaded like the the following with &quot;defer&quot;:</p>
<table width="90%" cellspacing="1" cellpadding="1" border="1" bgcolor="#ddddff" align="center" summary="">
<tbody>
<tr>
<td>&lt;script src=&quot;foo.js&quot; type=&quot;text/javascript&quot; defer&gt; &lt;/script&gt;</td>
</tr>
</tbody>
</table>
<p></p>
<table width="90%" cellspacing="1" cellpadding="1" border="1" bgcolor="#ddddff" align="center" summary="">
<tbody>
<tr>
<td>//foo.js<br />
function foo() {<br />
&nbsp;&nbsp;&nbsp; document.write(&quot;hello&quot;);<br />
}</td>
</tr>
</tbody>
</table>
<p>
Optimization never comes for free.  Watch out for the side effects it may brings.</p>
]]></content:encoded>
			<wfw:commentRss>http://stanblog.jojoyao.com/2007/01/mysterious-javascript-function-call-failure-and-loading-optimization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

