<?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>BraveNewCode Inc. &#187; bandwidth</title>
	<atom:link href="http://www.bravenewcode.com/tag/bandwidth/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bravenewcode.com</link>
	<description>You dream it up, we code it to life.</description>
	<lastBuildDate>Fri, 10 Sep 2010 15:00:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Thinking 320&#215;480: Load-Time Considerations For The iPhone &amp; iPod touch</title>
		<link>http://www.bravenewcode.com/2008/05/thinking-320x480-load-time-considerations-for-the-iphone-ipod-touch/</link>
		<comments>http://www.bravenewcode.com/2008/05/thinking-320x480-load-time-considerations-for-the-iphone-ipod-touch/#comments</comments>
		<pubDate>Mon, 05 May 2008 06:47:29 +0000</pubDate>
		<dc:creator>Dale Mugford</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Journal]]></category>
		<category><![CDATA[WPtouch]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[bandwidth]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[file size]]></category>
		<category><![CDATA[load times]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Prototype]]></category>
		<category><![CDATA[Scriptaculous]]></category>

		<guid isPermaLink="false">http://www.bravenewcode.com/?p=121</guid>
		<description><![CDATA[While we were working on WPtouch it quickly became clear that we would have to start considering all the ways we could accomplish a full-featured theme in the lowest file size possible, something that I&#8217;m sure many developers have faced when building web-based applications for Apple&#8217;s devices. While at times frustrating and challenging, the knowledge [...]]]></description>
			<content:encoded><![CDATA[<p>While we were working on <a href="http://www.bravenewcode.com/wptouch/">WPtouch</a> it quickly became clear that we would have to start considering all the ways we could accomplish a full-featured theme in the lowest file size possible, something that I&#8217;m sure many developers have faced when building web-based applications for Apple&#8217;s devices. While at times frustrating and challenging, the knowledge we gained from working within the limitations of the iPhone/iPod touch added optimization skills into our work coffers- some of which we already employ now in our client developent. In short, speed and size consideration for Apple devices has made our regular web projects even more refined and incredibly fast. <span id="more-121"></span></p>
<div class="spacer"></div>
<h3>OVERWEIGHT AND BLOATED?</h3>
<p>Having taken the broadband world for granted, we wanted to include some <a href="http://en.wikipedia.org/wiki/AJAX">Ajax</a> functions and <a href="http://script.aculo.us/">Scriptaculous</a>-based effects naturally, to add &#8216;ohh and awe&#8217; to the theme. Though Scriptaculous (being built on the 90k <a href="http://www.prototypejs.org/">Prototype</a>) is heavy duty when it comes to mobile Safari&#8217;s capability to swallow it, and it soon proved to be a major blockade to developing the theme in the ways we had imagined.</p>
<p>I don&#8217;t have real-world stats for the comparison on hand as I write this, but our testing revealed that we&#8217;d have to explore other options to accomplish a lighter bandwidth footprint and still have the features we wanted, because it was disastrously slow.</p>
<p>Our preference was to use Scriptaculous, mostly because we were both familiar with it, and had a library of prepared code to draw up to speed up the development cycle. In short- <em>we were lazy and looking for a quick fix to the predicament.</em></p>
<p>Enter compression. Now, I don&#8217;t claim to be an authority on this matter, as are there who need to take advantage of compression for mission critical application use, but I do know that when it comes to the raw transfer time of compressed vs. uncompressed scripts that <strong>every kilobyte makes an enormous difference,</strong> <em>especially</em> when we&#8217;re talking <a href="http://en.wikipedia.org/wiki/Enhanced_Data_Rates_for_GSM_Evolution">EDGE</a> on the iPhone.</p>
<div class="spacer"></div>
<h3>SQUEEZING INTO THESE PANTS</h3>
<p>The combined weight of the javascript effects on WPtouch is a staggering 48kb. Consider that Prototype, Scriptaculous (Effects only) and some custom iPhone/iPod touch specific code is contained in that tiny package. Uncompressed, it was over 170kb. That savings (nearly 4 times smaller) changed the page load times dramatically, and allowed us to go forward with our Prototype/Scriptaculous plans.</p>
<div class="spacer"></div>
<h3>STYLE FIRST</h3>
<p>We used CSS wherever possible to provide colours and shapes, and if it weren&#8217;t for the fact that mobile Safari doesn&#8217;t support its big brother&#8217;s capability for <a href="http://webkit.org/blog/130/css-transforms/">CSS transforms</a>, we would have been able to skip out on Scriptaculous for effects and just transform everything using CSS only.</p>
<div class="spacer"></div>
<h3>A PICTURE IS WORTH A THOUSAND BYTES</h3>
<p>The same was true for images. Whenever I could, I used the smallest possible sizes for files using a combination of very tiny crops for repeating images, and the &#8216;Save for web&#8217; option in Photoshop. </p>
<p>I could have saved likely 50% more in file size if I had chosen .jpg as the predominant file type, but I really loved the quality that .png images provided. Early testing showed the difference in load times with .jpgs was nominal compared to the washouts I was seeing in colour with them.</p>
<div class="spacer"></div>
<h3>MORE WEIGHT TO LOSE</h3>
<p>We continue to trim and squeeze more weight out of WPtouch, and as we move towards adding new features it will certainly be something that will remain a constant challenge. With the advent of theme-capability for the plugin, we imagine that users themselves will come up with some dazzling examples of optimization- something we&#8217;re looking forward to seeing. In the mean time we&#8217;ll be focused on improving the theme as it is, and dabbling with <a href="http://mootools.net/">Mootools</a> and <a href="http://jquery.com/">jQuery</a> in compressed forms, along with other scripts available on the web for performing the functions we need will be explored.</p>
<p>What&#8217;s your experience with compression and file-size trimming? Have you got tricks we (and our readers) would love to know about?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bravenewcode.com/2008/05/thinking-320x480-load-time-considerations-for-the-iphone-ipod-touch/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
