<?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: Don&#8217;t let document ready slow you down.</title>
	<atom:link href="http://alexsexton.com/?feed=rss2&#038;p=22" rel="self" type="application/rss+xml" />
	<link>http://alexsexton.com/?p=22</link>
	<description>$(&#039;human#alex thoughts&#039;).filter(&#039;:not(.bs)&#039;);</description>
	<lastBuildDate>Sun, 05 Sep 2010 12:36:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: David</title>
		<link>http://alexsexton.com/?p=22&#038;cpage=1#comment-936</link>
		<dc:creator>David</dc:creator>
		<pubDate>Sun, 22 Aug 2010 11:05:51 +0000</pubDate>
		<guid isPermaLink="false">http://alexsexton.com/?p=22#comment-936</guid>
		<description>Hi Alex, I saw this: http://encosia.com/2010/08/18/dont-let-jquerys-document-ready-slow-you-down/#comment-39702
Very similar to your post, isn&#039;t it?</description>
		<content:encoded><![CDATA[<p>Hi Alex, I saw this: <a href="http://encosia.com/2010/08/18/dont-let-jquerys-document-ready-slow-you-down/#comment-39702" rel="nofollow">http://encosia.com/2010/08/18/dont-let-jquerys-document-ready-slow-you-down/#comment-39702</a><br />
Very similar to your post, isn&#8217;t it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://alexsexton.com/?p=22&#038;cpage=1#comment-893</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Thu, 08 Jul 2010 23:38:10 +0000</pubDate>
		<guid isPermaLink="false">http://alexsexton.com/?p=22#comment-893</guid>
		<description>Thanks for the useful tip Alex!

I&#039;m going to go read your other posts now :)</description>
		<content:encoded><![CDATA[<p>Thanks for the useful tip Alex!</p>
<p>I&#8217;m going to go read your other posts now :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: My Tech World &#187; Getting Over Your jQuery DOM Ready Addiction</title>
		<link>http://alexsexton.com/?p=22&#038;cpage=1#comment-657</link>
		<dc:creator>My Tech World &#187; Getting Over Your jQuery DOM Ready Addiction</dc:creator>
		<pubDate>Sat, 15 May 2010 12:17:45 +0000</pubDate>
		<guid isPermaLink="false">http://alexsexton.com/?p=22#comment-657</guid>
		<description>[...] I’ll point to an excellent example from Alex Sexton: [...]</description>
		<content:encoded><![CDATA[<p>[...] I’ll point to an excellent example from Alex Sexton: [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://alexsexton.com/?p=22&#038;cpage=1#comment-52</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Mon, 25 Jan 2010 18:00:57 +0000</pubDate>
		<guid isPermaLink="false">http://alexsexton.com/?p=22#comment-52</guid>
		<description>I&#039;m not sure, with a page load of the size it seems like you have, this is going to do too much for you, however this technique isn&#039;t going to hurt anything. This is kind of a last step - save a few extra milliseconds type thing, not really a gigantic performance increase.

For your load time, I might suggest you just style the page to have a dialog on page load. That way it doesn&#039;t wait for jquery ui to load. Then at the end of the page just hide it with jquery. It stops you from having to load ui at all if that&#039;s the only place, or at least lets you wait until later.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure, with a page load of the size it seems like you have, this is going to do too much for you, however this technique isn&#8217;t going to hurt anything. This is kind of a last step &#8211; save a few extra milliseconds type thing, not really a gigantic performance increase.</p>
<p>For your load time, I might suggest you just style the page to have a dialog on page load. That way it doesn&#8217;t wait for jquery ui to load. Then at the end of the page just hide it with jquery. It stops you from having to load ui at all if that&#8217;s the only place, or at least lets you wait until later.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Toby</title>
		<link>http://alexsexton.com/?p=22&#038;cpage=1#comment-50</link>
		<dc:creator>Toby</dc:creator>
		<pubDate>Mon, 25 Jan 2010 16:51:46 +0000</pubDate>
		<guid isPermaLink="false">http://alexsexton.com/?p=22#comment-50</guid>
		<description>So here&#039;s a scenario for consideration with this technique.  My application relies heavily on jquery and jquery ui so they are loaded in the head.  For users with slower connections, I have to provide a modal message that informs the user to wait while the data loads.  Since the code is already loading, the ui dialog is the logical choice for the loading screen.

Ideally, the dialog would show first (or immediately after the  stuff appears) and the ajax calls would continue to populate the fields, the tabs build, etc.  Can this technique help accomplish this even if one set of ajax calls is synchronous?  Does the fact that I&#039;m using a master/content .aspx page and my ajax calls are to webmethods further complicate things?</description>
		<content:encoded><![CDATA[<p>So here&#8217;s a scenario for consideration with this technique.  My application relies heavily on jquery and jquery ui so they are loaded in the head.  For users with slower connections, I have to provide a modal message that informs the user to wait while the data loads.  Since the code is already loading, the ui dialog is the logical choice for the loading screen.</p>
<p>Ideally, the dialog would show first (or immediately after the  stuff appears) and the ajax calls would continue to populate the fields, the tabs build, etc.  Can this technique help accomplish this even if one set of ajax calls is synchronous?  Does the fact that I&#8217;m using a master/content .aspx page and my ajax calls are to webmethods further complicate things?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://alexsexton.com/?p=22&#038;cpage=1#comment-32</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Thu, 14 Jan 2010 20:34:29 +0000</pubDate>
		<guid isPermaLink="false">http://alexsexton.com/?p=22#comment-32</guid>
		<description>I absolutely agree. This is specifically for a site that loads its most relevant data via an ajax request... The _actual_ fastest way to make the request would be to just include the json at the bottom of the dom in the initial request... There are definitely things to consider when using this technique. I talked alot about how to make sure you don&#039;t have &#039;max_connections&#039; problems in the reply to Patrick&#039;s comment above.

Certainly for most pages, this isn&#039;t the answer. If your data is the core content of your page (often times mobile applications load in this manner), then this would be the ideal way to load your scripts, barring a native XHR implentation in order to save a framework load.

To go further, scripts should never block your page. You can get around &#039;max_connections&#039; issues very easily with a wildcard subdomain, and scripts can be loaded with a javascript loader to always make sure your resources are loaded asynchronously. LabJS (http://labjs.com/) offers a low filesize script loader that will do everything possible to load all of your javascript simultaneously and without blocking. I wasn&#039;t talking about dependency management, and was more showing an easy trick, so I didn&#039;t go into detail about this kind of stuff, but you should _certainly_ check it out if you are _ever_ worried about scripts blocking page load. It just doesn&#039;t have to happen...

Thanks for the feedback!</description>
		<content:encoded><![CDATA[<p>I absolutely agree. This is specifically for a site that loads its most relevant data via an ajax request&#8230; The _actual_ fastest way to make the request would be to just include the json at the bottom of the dom in the initial request&#8230; There are definitely things to consider when using this technique. I talked alot about how to make sure you don&#8217;t have &#8216;max_connections&#8217; problems in the reply to Patrick&#8217;s comment above.</p>
<p>Certainly for most pages, this isn&#8217;t the answer. If your data is the core content of your page (often times mobile applications load in this manner), then this would be the ideal way to load your scripts, barring a native XHR implentation in order to save a framework load.</p>
<p>To go further, scripts should never block your page. You can get around &#8216;max_connections&#8217; issues very easily with a wildcard subdomain, and scripts can be loaded with a javascript loader to always make sure your resources are loaded asynchronously. LabJS (<a href="http://labjs.com/" rel="nofollow">http://labjs.com/</a>) offers a low filesize script loader that will do everything possible to load all of your javascript simultaneously and without blocking. I wasn&#8217;t talking about dependency management, and was more showing an easy trick, so I didn&#8217;t go into detail about this kind of stuff, but you should _certainly_ check it out if you are _ever_ worried about scripts blocking page load. It just doesn&#8217;t have to happen&#8230;</p>
<p>Thanks for the feedback!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Landau</title>
		<link>http://alexsexton.com/?p=22&#038;cpage=1#comment-31</link>
		<dc:creator>Brian Landau</dc:creator>
		<pubDate>Thu, 14 Jan 2010 19:46:28 +0000</pubDate>
		<guid isPermaLink="false">http://alexsexton.com/?p=22#comment-31</guid>
		<description>I agree doing the live/livequery calls outside document ready generally makes a lot of sense. But, personally I feel it really depends on the situation for ajax requests.

The ajax call can result in slower page loads potentially. It causes another request to be made and if other resources haven&#039;t finished downloading this can slow down the retrieval of those other resources. Often times those resources (images, stylesheets, other scripts, etc.) are more important then the data in the ajax request to rendering the initial page.</description>
		<content:encoded><![CDATA[<p>I agree doing the live/livequery calls outside document ready generally makes a lot of sense. But, personally I feel it really depends on the situation for ajax requests.</p>
<p>The ajax call can result in slower page loads potentially. It causes another request to be made and if other resources haven&#8217;t finished downloading this can slow down the retrieval of those other resources. Often times those resources (images, stylesheets, other scripts, etc.) are more important then the data in the ajax request to rendering the initial page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://alexsexton.com/?p=22&#038;cpage=1#comment-30</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Thu, 14 Jan 2010 18:52:49 +0000</pubDate>
		<guid isPermaLink="false">http://alexsexton.com/?p=22#comment-30</guid>
		<description>jQuery tip of the year (since Jan 2009 :))! Thanks a lot.</description>
		<content:encoded><![CDATA[<p>jQuery tip of the year (since Jan 2009 :))! Thanks a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://alexsexton.com/?p=22&#038;cpage=1#comment-29</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Thu, 14 Jan 2010 16:52:26 +0000</pubDate>
		<guid isPermaLink="false">http://alexsexton.com/?p=22#comment-29</guid>
		<description>If anyone thinks that &quot;not thinking of a way to speed up a really edge-case webapp a couple of milliseconds&quot; makes you a noob, then they are crazy. Thank you for the feedback! I really appreciate you taking the time to read my stuff.</description>
		<content:encoded><![CDATA[<p>If anyone thinks that &#8220;not thinking of a way to speed up a really edge-case webapp a couple of milliseconds&#8221; makes you a noob, then they are crazy. Thank you for the feedback! I really appreciate you taking the time to read my stuff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://alexsexton.com/?p=22&#038;cpage=1#comment-28</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Thu, 14 Jan 2010 16:46:35 +0000</pubDate>
		<guid isPermaLink="false">http://alexsexton.com/?p=22#comment-28</guid>
		<description>I agree that it very much depends on the purpose of your ajax request.

In this case, all the relevant data on my page comes in through that request. The dom is essentially a set of bare templates to be filled in by my application. This would be common practice in many apps that use ajax to load subsequent pages and uses hash urls, etc.

That&#039;s why you&#039;ll also notice, that for this implementation, I have jquery loaded in the head. Generally this is against performance tips, but if the goal is to see the content as soon as possible, it makes a lot of sense here. In my _actual_ application that inspired this post, it only had to work in webkit, so I actually made a native XHR request (since I didn&#039;t have to worry about crossbrowser stuff) for the first request, and still loaded jquery down at the bottom.

As far as single domain max requests, I think it would be pretty simple for anyone with a need for added performance to set up a separate subdomain or two. You can just mirror the whole site on the subdomains, and you won&#039;t have to worry about older browsers limiting you to two requests. (In the case of the _actual_ app, I pulled all my static resources from a cdn, which has it&#039;s own added benefits on top of not blocking my ajax requests).

I think, regardless of when you make that ajax request, if you are worried about max server connections, you should add in subdomains, or a cdn. Chances are, the dom will be ready long before all your requests are finished, which would block the ajax call until they opened up.

Thanks for the salient input!</description>
		<content:encoded><![CDATA[<p>I agree that it very much depends on the purpose of your ajax request.</p>
<p>In this case, all the relevant data on my page comes in through that request. The dom is essentially a set of bare templates to be filled in by my application. This would be common practice in many apps that use ajax to load subsequent pages and uses hash urls, etc.</p>
<p>That&#8217;s why you&#8217;ll also notice, that for this implementation, I have jquery loaded in the head. Generally this is against performance tips, but if the goal is to see the content as soon as possible, it makes a lot of sense here. In my _actual_ application that inspired this post, it only had to work in webkit, so I actually made a native XHR request (since I didn&#8217;t have to worry about crossbrowser stuff) for the first request, and still loaded jquery down at the bottom.</p>
<p>As far as single domain max requests, I think it would be pretty simple for anyone with a need for added performance to set up a separate subdomain or two. You can just mirror the whole site on the subdomains, and you won&#8217;t have to worry about older browsers limiting you to two requests. (In the case of the _actual_ app, I pulled all my static resources from a cdn, which has it&#8217;s own added benefits on top of not blocking my ajax requests).</p>
<p>I think, regardless of when you make that ajax request, if you are worried about max server connections, you should add in subdomains, or a cdn. Chances are, the dom will be ready long before all your requests are finished, which would block the ajax call until they opened up.</p>
<p>Thanks for the salient input!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.252 seconds -->
<!-- Cached page served by WP-Cache -->
