<?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: Reducing the number of page components</title>
	<atom:link href="http://www.phpied.com/reducing-the-number-of-page-components/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpied.com/reducing-the-number-of-page-components/</link>
	<description>Stoyan&#039;s blog about &#60;a href=&#34;/category/xhtml&#34; class=&#34;tag-minor&#34;&#62;(x)html(5)&#60;/a&#62;, &#60;a href=&#34;/category/ajax&#34; class=&#34;tag-major&#34;&#62;ajax&#60;/a&#62;, &#60;a href=&#34;/category/bookmarklets&#34; class=&#34;tag-major&#34;&#62;bookmarklets&#60;/a&#62;, &#60;a href=&#34;/category/browsers&#34; class=&#34;tag-minor&#34;&#62;browsers&#60;/a&#62;, &#60;a href=&#34;/category/css&#34; class=&#34;tag-normal&#34;&#62;css&#60;/a&#62;, &#60;a href=&#34;/category/firebug&#34; class=&#34;tag-minor&#34;&#62;firebug&#60;/a&#62;, &#60;a href=&#34;/category/javascript&#34; class=&#34;tag-numero-uno&#34;&#62;javascript&#60;/a&#62;, &#60;a href=&#34;/category/json&#34; class=&#34;tag-normal&#34;&#62;json&#60;/a&#62;, &#60;a href=&#34;/category/mdb2&#34; class=&#34;tag-minor&#34;&#62;mdb2&#60;/a&#62;, &#60;a href=&#34;/category/mysql&#34; class=&#34;tag-normal&#34;&#62;mysql&#60;/a&#62;, &#60;a href=&#34;/category/pear&#34; class=&#34;tag-numero-uno&#34;&#62;pear&#60;/a&#62;, &#60;a href=&#34;/category/performance&#34; class=&#34;tag-major&#34;&#62;performance&#60;/a&#62;, &#60;a href=&#34;/category/php&#34; class=&#34;tag-numero-uno&#34;&#62;php&#60;/a&#62;, &#60;a href=&#34;/category/phpbb&#34; class=&#34;tag-major&#34;&#62;phpbb&#60;/a&#62;, &#60;a href=&#34;/category/tools&#34; class=&#34;tag-normal&#34;&#62;tools&#60;/a&#62;, &#60;a href=&#34;/category/yslow&#34; class=&#34;tag-minor&#34;&#62;yslow&#60;/a&#62;, &#60;a href=&#34;/category/yui&#34; class=&#34;tag-normal&#34;&#62;yui&#60;/a&#62;, &#60;a href=&#34;/category/writing&#34; class=&#34;tag-minor&#34;&#62;writing&#60;/a&#62;, &#60;a href=&#34;/category/music&#34; class=&#34;tag-major&#34;&#62;music&#60;/a&#62;,... &#60;a href=&#34;/category/life-and-everything&#34; class=&#34;tag-normal&#34;&#62;life and everything&#60;/a&#62;.</description>
	<lastBuildDate>Sat, 11 Feb 2012 14:07:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
	<item>
		<title>By: programs</title>
		<link>http://www.phpied.com/reducing-the-number-of-page-components/#comment-79723</link>
		<dc:creator>programs</dc:creator>
		<pubDate>Tue, 15 Nov 2011 05:26:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=986#comment-79723</guid>
		<description>&lt;strong&gt;programs...&lt;/strong&gt;

[...]Reducing the number of page components / Stoyan&#039;s phpied.com[...]...</description>
		<content:encoded><![CDATA[<p><strong>programs&#8230;</strong></p>
<p>[...]Reducing the number of page components / Stoyan&#8217;s phpied.com[...]&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vitre teinté</title>
		<link>http://www.phpied.com/reducing-the-number-of-page-components/#comment-75540</link>
		<dc:creator>vitre teinté</dc:creator>
		<pubDate>Sat, 08 Jan 2011 10:52:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=986#comment-75540</guid>
		<description>Well done, the site is much more pleasant to use.</description>
		<content:encoded><![CDATA[<p>Well done, the site is much more pleasant to use.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Performance Calendar &#187; Blog Archive &#187; The pain points of having fewer components</title>
		<link>http://www.phpied.com/reducing-the-number-of-page-components/#comment-74783</link>
		<dc:creator>Performance Calendar &#187; Blog Archive &#187; The pain points of having fewer components</dc:creator>
		<pubDate>Tue, 30 Nov 2010 19:49:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=986#comment-74783</guid>
		<description>[...] points of having fewer componentsby Stoyan Stefanov    Last night I talked about the benefits of reducing the number of page components and the resulting elimination of HTTP overhead. A little carried away into making the case [...]</description>
		<content:encoded><![CDATA[<p>[...] points of having fewer componentsby Stoyan Stefanov    Last night I talked about the benefits of reducing the number of page components and the resulting elimination of HTTP overhead. A little carried away into making the case [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Performance Calendar &#187; Blog Archive &#187; Reducing the payload: compression, minification, 204s</title>
		<link>http://www.phpied.com/reducing-the-number-of-page-components/#comment-74779</link>
		<dc:creator>Performance Calendar &#187; Blog Archive &#187; Reducing the payload: compression, minification, 204s</dc:creator>
		<pubDate>Tue, 30 Nov 2010 19:46:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=986#comment-74779</guid>
		<description>[...] the payload: compression, minification, 204sby Stoyan Stefanov    After removing all the extra HTTP requests you possibly can from your waterfall, it&#8217;s time to make sure that those that [...]</description>
		<content:encoded><![CDATA[<p>[...] the payload: compression, minification, 204sby Stoyan Stefanov    After removing all the extra HTTP requests you possibly can from your waterfall, it&#8217;s time to make sure that those that [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Performance Calendar &#187; Blog Archive &#187; DOM access optimization</title>
		<link>http://www.phpied.com/reducing-the-number-of-page-components/#comment-74769</link>
		<dc:creator>Performance Calendar &#187; Blog Archive &#187; DOM access optimization</dc:creator>
		<pubDate>Tue, 30 Nov 2010 16:54:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=986#comment-74769</guid>
		<description>[...] access optimizationby Stoyan Stefanov    This blog series has sailed from the shores of networking, passed down waterfalls and reflows, and arrived in ECMAScriptland. Now, turns out [...]</description>
		<content:encoded><![CDATA[<p>[...] access optimizationby Stoyan Stefanov    This blog series has sailed from the shores of networking, passed down waterfalls and reflows, and arrived in ECMAScriptland. Now, turns out [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sci-Fi-Si</title>
		<link>http://www.phpied.com/reducing-the-number-of-page-components/#comment-72277</link>
		<dc:creator>Sci-Fi-Si</dc:creator>
		<pubDate>Mon, 08 Feb 2010 16:57:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=986#comment-72277</guid>
		<description>Good post, many thanks.

I&#039;ve been optimising for the past month and still trying to figure which are the best pay-offs&#039;. It&#039;s good to know I&#039;m not the only optimising perfectionist...

:)</description>
		<content:encoded><![CDATA[<p>Good post, many thanks.</p>
<p>I&#8217;ve been optimising for the past month and still trying to figure which are the best pay-offs&#8217;. It&#8217;s good to know I&#8217;m not the only optimising perfectionist&#8230;</p>
<p> <img src='http://www.phpied.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fabrizio</title>
		<link>http://www.phpied.com/reducing-the-number-of-page-components/#comment-72203</link>
		<dc:creator>Fabrizio</dc:creator>
		<pubDate>Mon, 25 Jan 2010 13:28:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=986#comment-72203</guid>
		<description>I&#039;m trying to merge multiple file.js in a single file but some script don&#039;t run.
I haven&#039;t problems when I include js with 

I did a file with inline script like this:
content of file1
content of file1
content of file1
content of file1
but the problems remain...

Could you please help me to understand why?</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to merge multiple file.js in a single file but some script don&#8217;t run.<br />
I haven&#8217;t problems when I include js with </p>
<p>I did a file with inline script like this:<br />
content of file1<br />
content of file1<br />
content of file1<br />
content of file1<br />
but the problems remain&#8230;</p>
<p>Could you please help me to understand why?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://www.phpied.com/reducing-the-number-of-page-components/#comment-71888</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Sat, 05 Dec 2009 15:31:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=986#comment-71888</guid>
		<description>I quite agree with Kyle. But I still have some concerns about combining js files. Of course, if we can combine all js files into 1 big file, it will improve performance, but it will also hurt the browser&#039;s cache. For example, the first page contains 1.js, 2.js and 3.js, and combine them to all.js. So the browswer will get all.js and cache it. But for the second page which may only contain 1.js and 2.js, browser will need to fetch them again. 

So it is not quite easy for us to find which files should be combine together. We need to balance between two perspectives:
1) most common files across all pages
2) combine as more files as possible

What&#039;s your best practice about this issue? How to find the best strategy to combine js and css files?</description>
		<content:encoded><![CDATA[<p>I quite agree with Kyle. But I still have some concerns about combining js files. Of course, if we can combine all js files into 1 big file, it will improve performance, but it will also hurt the browser&#8217;s cache. For example, the first page contains 1.js, 2.js and 3.js, and combine them to all.js. So the browswer will get all.js and cache it. But for the second page which may only contain 1.js and 2.js, browser will need to fetch them again. </p>
<p>So it is not quite easy for us to find which files should be combine together. We need to balance between two perspectives:<br />
1) most common files across all pages<br />
2) combine as more files as possible</p>
<p>What&#8217;s your best practice about this issue? How to find the best strategy to combine js and css files?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyle Simpson</title>
		<link>http://www.phpied.com/reducing-the-number-of-page-components/#comment-71887</link>
		<dc:creator>Kyle Simpson</dc:creator>
		<pubDate>Sat, 05 Dec 2009 14:53:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=986#comment-71887</guid>
		<description>This is a very good article overall. Certainly, it&#039;s becoming more and more important to reduce not only the amount of unnecessary content sent to pages (at least at initial page-load), but also optimize how the necessary stuff is transferred. Far too long, those things were only cared about by the jumbo major traffic sites, but now we know all of us have that responsibility, for the betterment of user-experience.

However, I still have to take slight issue with the concept of combining as much content as possible into a single stream of data. Yes, we need to reduce unnecessary HTTP requests and overhead -- I just saw yesterday a profile of a page-load from a major online kids toy retailer that had over 60 different http requests, which is of course RIDICULOUS! But I just don&#039;t think that &quot;1&quot; is the ultimate best goal. I think there needs to be a balance between reducing HTTP requests and:

1. parallel byte download streams (for instance, loading JavaScript in parallel with LABjs) -- if you take one 100k file and download it as two 50k files, it&#039;ll download (in theory) in half the time, but then factoring in HTTP request overhead, it might go to 2/3 or 3/4 the time. But the point is, for these larger resources, it&#039;s still likely to download faster in parallel than the single stream would have come down serially.

2. caching: not just caching during a single visit, but also caching across visits (say over a week, or even a month). Yes, I know that the browser cache is not reliable, and a non-trivial amount of people come with no primed cache at all. BUT, that doesn&#039;t mean, IMHO, that the cache is moot -- it&#039;s still a very important piece of the puzzle.

For instance, if you have 4 JS files you concat into 1, and it&#039;s now 100k in size... and then you realize that a few lines of that JavaScript are likely to be changed more often (say because you are tweaking UX/animations, or fixing bugs in new code, etc), if you change even one single byte of that combined file, then every single visitor will have to redownload the other 99.999k unnecessarily the next time they visit.

So, maybe we should profile and keep our JS in 2 files (or perhaps 3), based on factors like likelihood to change (for instance, frameworks and plugins *rarely* change, but the code which uses them is more likely to change as you tweak your site). You may pay slight costs in extra overhead on first page views, but over the life of your site and your visitors re-visits to your site, you will probably see better overall page-load performance. This may not be most important, but it&#039;s not something to be completely forgotten either.

I&#039;ve written up a bunch of thoughts in more detail on this topic over on this post, if you are interested in digging more into detail on concat&#039;ing resources:

http://blog.getify.com/2009/11/labjs-why-not-just-concat</description>
		<content:encoded><![CDATA[<p>This is a very good article overall. Certainly, it&#8217;s becoming more and more important to reduce not only the amount of unnecessary content sent to pages (at least at initial page-load), but also optimize how the necessary stuff is transferred. Far too long, those things were only cared about by the jumbo major traffic sites, but now we know all of us have that responsibility, for the betterment of user-experience.</p>
<p>However, I still have to take slight issue with the concept of combining as much content as possible into a single stream of data. Yes, we need to reduce unnecessary HTTP requests and overhead &#8212; I just saw yesterday a profile of a page-load from a major online kids toy retailer that had over 60 different http requests, which is of course RIDICULOUS! But I just don&#8217;t think that &#8220;1&#8243; is the ultimate best goal. I think there needs to be a balance between reducing HTTP requests and:</p>
<p>1. parallel byte download streams (for instance, loading JavaScript in parallel with LABjs) &#8212; if you take one 100k file and download it as two 50k files, it&#8217;ll download (in theory) in half the time, but then factoring in HTTP request overhead, it might go to 2/3 or 3/4 the time. But the point is, for these larger resources, it&#8217;s still likely to download faster in parallel than the single stream would have come down serially.</p>
<p>2. caching: not just caching during a single visit, but also caching across visits (say over a week, or even a month). Yes, I know that the browser cache is not reliable, and a non-trivial amount of people come with no primed cache at all. BUT, that doesn&#8217;t mean, IMHO, that the cache is moot &#8212; it&#8217;s still a very important piece of the puzzle.</p>
<p>For instance, if you have 4 JS files you concat into 1, and it&#8217;s now 100k in size&#8230; and then you realize that a few lines of that JavaScript are likely to be changed more often (say because you are tweaking UX/animations, or fixing bugs in new code, etc), if you change even one single byte of that combined file, then every single visitor will have to redownload the other 99.999k unnecessarily the next time they visit.</p>
<p>So, maybe we should profile and keep our JS in 2 files (or perhaps 3), based on factors like likelihood to change (for instance, frameworks and plugins *rarely* change, but the code which uses them is more likely to change as you tweak your site). You may pay slight costs in extra overhead on first page views, but over the life of your site and your visitors re-visits to your site, you will probably see better overall page-load performance. This may not be most important, but it&#8217;s not something to be completely forgotten either.</p>
<p>I&#8217;ve written up a bunch of thoughts in more detail on this topic over on this post, if you are interested in digging more into detail on concat&#8217;ing resources:</p>
<p><a href="http://blog.getify.com/2009/11/labjs-why-not-just-concat" rel="nofollow">http://blog.getify.com/2009/11/labjs-why-not-just-concat</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allogarage</title>
		<link>http://www.phpied.com/reducing-the-number-of-page-components/#comment-71885</link>
		<dc:creator>Allogarage</dc:creator>
		<pubDate>Sat, 05 Dec 2009 14:17:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=986#comment-71885</guid>
		<description>Thanks for the summary. I already implement css and jss minification+concatenation on deployment, but I never heard about mixing js and css. Seems to be simple, I will make some tests.</description>
		<content:encoded><![CDATA[<p>Thanks for the summary. I already implement css and jss minification+concatenation on deployment, but I never heard about mixing js and css. Seems to be simple, I will make some tests.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

