<?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"
	>
<channel>
	<title>Comments on: Positioning CSS and JS files in HTML content</title>
	<atom:link href="http://www.megaburst.com/architecture/positioning-css-and-js-files-in-html-content/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.megaburst.com/architecture/positioning-css-and-js-files-in-html-content/</link>
	<description>High performance web site building</description>
	<pubDate>Fri, 21 Nov 2008 23:18:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: mike503</title>
		<link>http://www.megaburst.com/architecture/positioning-css-and-js-files-in-html-content/#comment-133</link>
		<dc:creator>mike503</dc:creator>
		<pubDate>Tue, 08 Apr 2008 03:26:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.megaburst.com/architecture/positioning-css-and-js-files-in-html-content/#comment-133</guid>
		<description>I tried to get the best score possible using YSlow! and positioning the CSS at the top, JS at the bottom, setting appropriate gzip, expires headers, etc, etc.

However, it seems that some Javascripts should still be at the top - jQuery, while it has a document.ready() and other options to wait until the page has finished loading, doesn't seem to reliably perform when it's at the bottom... especially if you have page interaction features that could be clicked/executed before the page is fully loaded.

So for now, I include jQuery at the top and any other script(s) which have user interaction options (which at this point, is all 4 of them or whatever)

i.e. we had a "Login" link which popped up a DHTML window layer thingy - without jQuery having the document.ready() firing yet, the link was dead (and would stay dead even after the page loaded in certain browsers) - the only way to resolve it was to reload the page and wait until it fully loaded.

Have to make sure that you can anticipate users being impatient and code appropriately :)</description>
		<content:encoded><![CDATA[<p>I tried to get the best score possible using YSlow! and positioning the CSS at the top, JS at the bottom, setting appropriate gzip, expires headers, etc, etc.</p>
<p>However, it seems that some Javascripts should still be at the top - jQuery, while it has a document.ready() and other options to wait until the page has finished loading, doesn&#8217;t seem to reliably perform when it&#8217;s at the bottom&#8230; especially if you have page interaction features that could be clicked/executed before the page is fully loaded.</p>
<p>So for now, I include jQuery at the top and any other script(s) which have user interaction options (which at this point, is all 4 of them or whatever)</p>
<p>i.e. we had a &#8220;Login&#8221; link which popped up a DHTML window layer thingy - without jQuery having the document.ready() firing yet, the link was dead (and would stay dead even after the page loaded in certain browsers) - the only way to resolve it was to reload the page and wait until it fully loaded.</p>
<p>Have to make sure that you can anticipate users being impatient and code appropriately <img src='http://www.megaburst.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
</channel>
</rss>
