<?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: Fewer requests through resource packages</title>
	<atom:link href="http://www.stevesouders.com/blog/2009/11/18/fewer-requests-through-resource-packages/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stevesouders.com/blog/2009/11/18/fewer-requests-through-resource-packages/</link>
	<description>Essential knowledge for making your web pages faster.</description>
	<lastBuildDate>Fri, 30 Jul 2010 02:13:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Michael Kozakewich</title>
		<link>http://www.stevesouders.com/blog/2009/11/18/fewer-requests-through-resource-packages/comment-page-1/#comment-1204</link>
		<dc:creator>Michael Kozakewich</dc:creator>
		<pubDate>Mon, 07 Dec 2009 14:49:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=729#comment-1204</guid>
		<description>What would it take to create a client-side script that would look in the cache, see which files it needs, send that to the server, and have a server-side script compile anything new into a zip on-the-fly to send to the client?

Would zipping a file take too much time? Is it possible to zip-compress each file beforehand, then use scripts to combine the file pieces together with some zip headers and footers?
(Yeah, I don&#039;t know exactly how zipping works.)

The idea of downloading an entire zip file over again when something changes is terrible. That has to have a work-around.</description>
		<content:encoded><![CDATA[<p>What would it take to create a client-side script that would look in the cache, see which files it needs, send that to the server, and have a server-side script compile anything new into a zip on-the-fly to send to the client?</p>
<p>Would zipping a file take too much time? Is it possible to zip-compress each file beforehand, then use scripts to combine the file pieces together with some zip headers and footers?<br />
(Yeah, I don&#8217;t know exactly how zipping works.)</p>
<p>The idea of downloading an entire zip file over again when something changes is terrible. That has to have a work-around.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: skanga</title>
		<link>http://www.stevesouders.com/blog/2009/11/18/fewer-requests-through-resource-packages/comment-page-1/#comment-1189</link>
		<dc:creator>skanga</dc:creator>
		<pubDate>Thu, 03 Dec 2009 20:00:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=729#comment-1189</guid>
		<description>I like this idea very much. However, I think it should become a part of the HTTP spec rather than be implemented via HTML tags.

This would guarantee adoption of this proposal WITHOUT needing anyone to change any of their pages. As soon as the HTTP server is upgraded all customers with upgraded browsers will see the performance benefits.

Web servers would become responsible to generate another HTTP header (similar to content negotiation) which defines the resources that the current page depends upon. This would also guarantee that all dependencies are resolved BEFORE the page is loaded.

Example HTTP header:

Accept-package: type=application/zip; href=/pkg.zip; 

This approach allows for flexibility in compression types so, for example we could also have:

Accept-package: type=application/gzip; href=/pkg.gz; 

Additionally, this scheme would also allow the manifest to be fetched inline. So we don&#039;t have to worry about whether the manifest is first in the zip file or not:

Accept-package: type=application/zip; href=/pkg.zip; manifest=js/jquery.js; js/main.js; css/reset.css; css/grid.css; css/main.css; images/logo.gif; images/navbar.png

Or, if that&#039;s too messy the manifest could be fetched in another href: 

Accept-package: type=application/zip; href=/pkg.zip; manifest-href=/manifest.txt

but that would require an extra HTTP request!

Thoughts anyone?

Shiraz</description>
		<content:encoded><![CDATA[<p>I like this idea very much. However, I think it should become a part of the HTTP spec rather than be implemented via HTML tags.</p>
<p>This would guarantee adoption of this proposal WITHOUT needing anyone to change any of their pages. As soon as the HTTP server is upgraded all customers with upgraded browsers will see the performance benefits.</p>
<p>Web servers would become responsible to generate another HTTP header (similar to content negotiation) which defines the resources that the current page depends upon. This would also guarantee that all dependencies are resolved BEFORE the page is loaded.</p>
<p>Example HTTP header:</p>
<p>Accept-package: type=application/zip; href=/pkg.zip; </p>
<p>This approach allows for flexibility in compression types so, for example we could also have:</p>
<p>Accept-package: type=application/gzip; href=/pkg.gz; </p>
<p>Additionally, this scheme would also allow the manifest to be fetched inline. So we don&#8217;t have to worry about whether the manifest is first in the zip file or not:</p>
<p>Accept-package: type=application/zip; href=/pkg.zip; manifest=js/jquery.js; js/main.js; css/reset.css; css/grid.css; css/main.css; images/logo.gif; images/navbar.png</p>
<p>Or, if that&#8217;s too messy the manifest could be fetched in another href: </p>
<p>Accept-package: type=application/zip; href=/pkg.zip; manifest-href=/manifest.txt</p>
<p>but that would require an extra HTTP request!</p>
<p>Thoughts anyone?</p>
<p>Shiraz</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zerodeux</title>
		<link>http://www.stevesouders.com/blog/2009/11/18/fewer-requests-through-resource-packages/comment-page-1/#comment-1184</link>
		<dc:creator>zerodeux</dc:creator>
		<pubDate>Thu, 03 Dec 2009 09:22:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=729#comment-1184</guid>
		<description>The blog swalled my tag, let&#039;s use another code: &quot;maybe &#124;link rel=&quot;bundle&quot; type=&quot;multipart/mixed&quot; href=&quot;/site.js /tracker.js /foo.js&quot;&#124; is not that crazy&quot;.</description>
		<content:encoded><![CDATA[<p>The blog swalled my tag, let&#8217;s use another code: &#8220;maybe |link rel=&#8221;bundle&#8221; type=&#8221;multipart/mixed&#8221; href=&#8221;/site.js /tracker.js /foo.js&#8221;| is not that crazy&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zerodeux</title>
		<link>http://www.stevesouders.com/blog/2009/11/18/fewer-requests-through-resource-packages/comment-page-1/#comment-1183</link>
		<dc:creator>zerodeux</dc:creator>
		<pubDate>Thu, 03 Dec 2009 09:16:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=729#comment-1183</guid>
		<description>As fool said, that could  be handled at the HTTP level.

HTTP can already gzip-encode any document at the transport level. Besides some brokenness in CSS and JS decompression that&#039;s mostly history in IE (IE6 is history, isn&#039;t it ?), we take for granted that we can deploy (or dynamically generate) any plain text file on a web server and let the HTTP server gzip it. I can&#039;t see the CPU and memory impact of gzipping on my servers today, it&#039;s a tiny fraction of any work of a frontend. And it&#039;s a great and automatic benefit for everybody and strategic types of document.

HTTP could also solve the problem of fetching multiple documents at once. The whole idea is to spare round time trips, isn&#039;t it ? We could preserve all HTTP semantics (one URI per document, caching, headers, etc) if we could send a HTTP GET which bundles many URIs and expects for instance a MIME encapsulated response with headers+body for every requested document.

I don&#039;t think that could be handled by globs like &#039;GET /*.js&#039;, this would be to complicated to specify and implement (the browser would not know distinct ressource names in advance for a start). And obviously that would have to be somewhat URL-encoded to reuse all the infrastructure we have. Maybe  is not that crazy.

The bundle.zip has the advantage of letting the developper explicitly choose and name what&#039;s bundled together. With a &#039;multiple document&#039; GET request, we would have to let the browser decide how to bundle requests (alhtough it might be smarter than a webdev on average :)).

It also only leverages client-side support and no protocol changes. Obviously this is way easier to implement and foster.

The bundle.zip has the disavdantage of providing poor or no metadata: zip will store the mdate and that&#039;s pretty it, nothing like HTTP headers. That could be painful: for bundles, the browser will map an extension to a MIME type, which will not be necessarily the same mapping as the one picked by the server. Going back and forth between single and bundled ressources will not be always easy and transparent.

Support for &quot;Get multiple&quot; would require basically the same basecode as MHTML on the client side I guess. On the server side this is a kind of &#039;HTTP pipelining&#039; but without the async nightmare of it: there&#039;s one session for many documents, but first client talks, then server answers, and done. The server side can be prototyped easily with a simple CGI.</description>
		<content:encoded><![CDATA[<p>As fool said, that could  be handled at the HTTP level.</p>
<p>HTTP can already gzip-encode any document at the transport level. Besides some brokenness in CSS and JS decompression that&#8217;s mostly history in IE (IE6 is history, isn&#8217;t it ?), we take for granted that we can deploy (or dynamically generate) any plain text file on a web server and let the HTTP server gzip it. I can&#8217;t see the CPU and memory impact of gzipping on my servers today, it&#8217;s a tiny fraction of any work of a frontend. And it&#8217;s a great and automatic benefit for everybody and strategic types of document.</p>
<p>HTTP could also solve the problem of fetching multiple documents at once. The whole idea is to spare round time trips, isn&#8217;t it ? We could preserve all HTTP semantics (one URI per document, caching, headers, etc) if we could send a HTTP GET which bundles many URIs and expects for instance a MIME encapsulated response with headers+body for every requested document.</p>
<p>I don&#8217;t think that could be handled by globs like &#8216;GET /*.js&#8217;, this would be to complicated to specify and implement (the browser would not know distinct ressource names in advance for a start). And obviously that would have to be somewhat URL-encoded to reuse all the infrastructure we have. Maybe  is not that crazy.</p>
<p>The bundle.zip has the advantage of letting the developper explicitly choose and name what&#8217;s bundled together. With a &#8216;multiple document&#8217; GET request, we would have to let the browser decide how to bundle requests (alhtough it might be smarter than a webdev on average :)).</p>
<p>It also only leverages client-side support and no protocol changes. Obviously this is way easier to implement and foster.</p>
<p>The bundle.zip has the disavdantage of providing poor or no metadata: zip will store the mdate and that&#8217;s pretty it, nothing like HTTP headers. That could be painful: for bundles, the browser will map an extension to a MIME type, which will not be necessarily the same mapping as the one picked by the server. Going back and forth between single and bundled ressources will not be always easy and transparent.</p>
<p>Support for &#8220;Get multiple&#8221; would require basically the same basecode as MHTML on the client side I guess. On the server side this is a kind of &#8216;HTTP pipelining&#8217; but without the async nightmare of it: there&#8217;s one session for many documents, but first client talks, then server answers, and done. The server side can be prototyped easily with a simple CGI.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Souders</title>
		<link>http://www.stevesouders.com/blog/2009/11/18/fewer-requests-through-resource-packages/comment-page-1/#comment-1144</link>
		<dc:creator>Steve Souders</dc:creator>
		<pubDate>Mon, 23 Nov 2009 22:53:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=729#comment-1144</guid>
		<description>@Berry: The manifest.txt is the first file in the zip - it&#039;s not a separate HTTP request.

@Kyle: Most of the discussion has been around inlining the manifest.txt in HTML. Doing it as header would work, too.</description>
		<content:encoded><![CDATA[<p>@Berry: The manifest.txt is the first file in the zip &#8211; it&#8217;s not a separate HTTP request.</p>
<p>@Kyle: Most of the discussion has been around inlining the manifest.txt in HTML. Doing it as header would work, too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyle Simpson</title>
		<link>http://www.stevesouders.com/blog/2009/11/18/fewer-requests-through-resource-packages/comment-page-1/#comment-1143</link>
		<dc:creator>Kyle Simpson</dc:creator>
		<pubDate>Mon, 23 Nov 2009 20:08:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=729#comment-1143</guid>
		<description>I think the manifest.txt info should be inlined in the response that the HTTP request gives, as a set of X-Headers, for instance.</description>
		<content:encoded><![CDATA[<p>I think the manifest.txt info should be inlined in the response that the HTTP request gives, as a set of X-Headers, for instance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Berry de Vos</title>
		<link>http://www.stevesouders.com/blog/2009/11/18/fewer-requests-through-resource-packages/comment-page-1/#comment-1140</link>
		<dc:creator>Berry de Vos</dc:creator>
		<pubDate>Mon, 23 Nov 2009 09:50:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=729#comment-1140</guid>
		<description>I am not an expert on ZIP file, but PKZIP specification contains the following:

V. General Format of a .ZIP file
Files stored in arbitrary order.

There are probably ZIP compressor clients that allow you to specify which file comes first in the library, but doesn&#039;t this make the whole idea a lot more complicated. Wouldn&#039;t it be better to just include this information in the HTML itself.

Adding this manifest.txt as a separate file doesn&#039;t seem smart, since it would then introduce yet another HTTP request.</description>
		<content:encoded><![CDATA[<p>I am not an expert on ZIP file, but PKZIP specification contains the following:</p>
<p>V. General Format of a .ZIP file<br />
Files stored in arbitrary order.</p>
<p>There are probably ZIP compressor clients that allow you to specify which file comes first in the library, but doesn&#8217;t this make the whole idea a lot more complicated. Wouldn&#8217;t it be better to just include this information in the HTML itself.</p>
<p>Adding this manifest.txt as a separate file doesn&#8217;t seem smart, since it would then introduce yet another HTTP request.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: monroe</title>
		<link>http://www.stevesouders.com/blog/2009/11/18/fewer-requests-through-resource-packages/comment-page-1/#comment-1136</link>
		<dc:creator>monroe</dc:creator>
		<pubDate>Sat, 21 Nov 2009 04:25:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=729#comment-1136</guid>
		<description>I would love the day I can use something like this on my work.</description>
		<content:encoded><![CDATA[<p>I would love the day I can use something like this on my work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Souders</title>
		<link>http://www.stevesouders.com/blog/2009/11/18/fewer-requests-through-resource-packages/comment-page-1/#comment-1135</link>
		<dc:creator>Steve Souders</dc:creator>
		<pubDate>Sat, 21 Nov 2009 00:29:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=729#comment-1135</guid>
		<description>List it first? I know the spec says the order of the directory might not be the order in the zip. Have you seen that the file listed first isn&#039;t included first? Does that vary by tool? I don&#039;t have a tool to examine the streaming bytes of a zip file. How do you verify this?</description>
		<content:encoded><![CDATA[<p>List it first? I know the spec says the order of the directory might not be the order in the zip. Have you seen that the file listed first isn&#8217;t included first? Does that vary by tool? I don&#8217;t have a tool to examine the streaming bytes of a zip file. How do you verify this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyle Simpson</title>
		<link>http://www.stevesouders.com/blog/2009/11/18/fewer-requests-through-resource-packages/comment-page-1/#comment-1134</link>
		<dc:creator>Kyle Simpson</dc:creator>
		<pubDate>Fri, 20 Nov 2009 20:51:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=729#comment-1134</guid>
		<description>@Steve (et al): how do we guarantee that the manifest.txt is the first file in the .zip file?</description>
		<content:encoded><![CDATA[<p>@Steve (et al): how do we guarantee that the manifest.txt is the first file in the .zip file?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
