<?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>Wayne Pan &#187; iphone</title>
	<atom:link href="http://waynepan.com/tag/iphone/feed/" rel="self" type="application/rss+xml" />
	<link>http://waynepan.com</link>
	<description>tech &#124; js &#124; ui &#124; ajax &#124; mobile</description>
	<lastBuildDate>Mon, 17 Oct 2011 20:52:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>iPhone 4.0 and Multitasking</title>
		<link>http://waynepan.com/2010/04/09/iphone-4-0-and-multitasking/</link>
		<comments>http://waynepan.com/2010/04/09/iphone-4-0-and-multitasking/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 08:01:54 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://waynepan.com/?p=514</guid>
		<description><![CDATA[Back in Jan. I wrote the following about Apple&#8217;s view of multitasking: Normal users do not want to deal with resource management nor do they understand it. Today, Steve Jobs confirmed it by saying, &#8220;In multitasking, if you see a &#8230; <a href="http://waynepan.com/2010/04/09/iphone-4-0-and-multitasking/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p class='aligncenter'><img src="http://waynepan.com/wp-content/uploads/2010/04/iphone-os4.png" alt="" title="iphone-os4" width="300" height="274" class="size-full wp-image-515" /></p>
<p>Back in Jan. I wrote the following about <a href="http://waynepan.com/2010/01/28/ipad-multi-tasking-flash/">Apple&#8217;s view of multitasking</a>:</p>
<blockquote><p>
Normal users do not want to deal with resource management nor do they understand it.
</p></blockquote>
<p>Today, Steve Jobs confirmed it by <a href="http://www.engadget.com/2010/04/08/jobs-if-you-see-a-stylus-or-a-task-manager-they-blew-it/">saying</a>, &#8220;<i>In multitasking, if you see a task manager&#8230; they blew it. Users shouldn&#8217;t ever have to think about it</i>.&#8221;</p>
<p>The problem is that, neither webOS and Android have a task manager (although the first thing that most Android users download is a task manager). Also, webOS has a much better implementation of app switching than iPhone 4.0. Quitting apps on webOS is a simple flick of the finger up while you have to tap and hold an app in the taskbar to quit an app in iPhone 4.0. </p>
<p>By restricting backgrounded apps to one of 7 services, Apple has solved the problem of resource and battery management. The 7 services, audio, VoIP, location, push notifications, local notifications, fast app, and &#8220;task&#8221; completion, allows for 90% of what most users will need backgrounding for. Sadly, though 4.0 won&#8217;t be hitting the iPad until Fall, 6 months or 1/2 the iPad 1.0&#8242;s life cycle.</p>
]]></content:encoded>
			<wfw:commentRss>http://waynepan.com/2010/04/09/iphone-4-0-and-multitasking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switching to Android/Nexus One from iPhone</title>
		<link>http://waynepan.com/2010/04/06/switching-to-androidnexus-one-from-iphone/</link>
		<comments>http://waynepan.com/2010/04/06/switching-to-androidnexus-one-from-iphone/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 05:25:33 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[nexus one]]></category>

		<guid isPermaLink="false">http://waynepan.com/?p=497</guid>
		<description><![CDATA[After Google released the Nexus One with 3G AT&#038;T compatibility, it looked like a perfect time to switch off the iPhone. Being able to use my current AT&#038;T sim while maintaining 3g speeds pushed me over the edge (no pun &#8230; <a href="http://waynepan.com/2010/04/06/switching-to-androidnexus-one-from-iphone/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After Google released the Nexus One with 3G AT&#038;T compatibility, it looked like a perfect time to switch off the iPhone. Being able to use my current AT&#038;T sim while maintaining 3g speeds pushed me over the edge (no pun intended). After a week of using the Nexus One as my main phone, here are some thoughts.</p>
<p><b>Top 6 Nexus One/Android Pros</b></p>
<ul>
<li><b>Gmail</b> &#8211; It won&#8217;t come as any surprise but if you&#8217;re a heavy Gmail user, Android should be your phone of choice. Labels, archive, search, and threads. Almost as good as the real thing</li>
<li><b>Hot Spot</b> &#8211; with a <a href="http://wiki.cyanogenmod.com/index.php/Full_Update_Guide_-_Nexus_One_Firmware_to_CyanogenMod">simple rom replacement</a> and <a href="http://code.google.com/p/android-wifi-tether/">wifi-tether</a>, my phone is now a mobile hot spot. (Hello iPad 3G without paying an extra $20).</li>
<li><b>Widgets</b> &#8211; News widget, foursquare widget, the homescreens of the Android are much more useful than the iPhone&#8217;s. Also, Maps has a live wallpaper that shows traffic for my current area, constantly.</li>
<li><b>Turn by Turn Directions</b> &#8211; Built in turn by turn directions allows you to toss your GPS. </li>
<li><b>Widgets</b><br />
<img src="http://waynepan.com/wp-content/uploads/2010/03/Screen-shot-2010-03-20-at-12.49.20-PM.png" alt="" title="Screen shot 2010-03-20 at 12.49.20 PM" width="307" height="85" class="alignnone size-full wp-image-498" /><br />
The power widget allows you to turn on/off power draining features of the phone from the homescreen. This is great since the Nexus One doesn&#8217;t seem to be able to make it through a whole day for me.
</li>
<li><b>Google Voice</b> &#8211; Full Google Voice integration&#8230; if you&#8217;re a Google Voice user. I won&#8217;t use Google Voice until I can port my existing number to it.</li>
</ul>
<p><b>Top 6 Nexus One/Android Annoyances</b></p>
<ul>
<li><b>Non-Gmail Email</b> &#8211; I have serious issues with my company&#8217;s exchange account. For no discernible reason, the native Email app stops syncing mails. Refresh doesn&#8217;t help, deleting the account and recreating will solve the problem for a couple days. Infuriating. Also it&#8217;s not possible to search non-Gmail accounts. To top it off, there&#8217;s no way to access a Yahoo! mail account (except to pay for Yahoo! Mail Plus) </li>
<li><b>No Exchange Calendar Sync</b> &#8211; No explanation needed.</li>
<li><b>Landscape mode only works turning left!</b> &#8211; At first I thought many apps didn&#8217;t have landscape mode, but apparently turning the phone clockwise will not trigger landscape mode. This might be useful when reading in bed, but so far it&#8217;s been an annoyance. </li>
<li><b>Touch screen is inaccurate</b> &#8211; in the browser, I find myself clicking on a link only to have the link below register the click. Reports of the Nexus One&#8217;s touchscreen being inferior are not exaggerated  </li>
<li><b>No good Podcast listener</b> &#8211; the best podcast app I&#8217;ve found is <a href="http://listen.googlelabs.com/">Google Listen</a>. It auto syncs podcast but lacks <i>double speed</i> playback!</li>
<li><b>Missing Mint.com and Scrabble/Words with Friends</b> &#8211; There is no native Mint.com or Scrabble or the Scrabble rip-off Word with Friends. </li>
</ul>
<p>Over the course of a couple weeks, friends have asked me &#8220;Hey, is that a better phone than my iPhone.&#8221; I have consistently said absolutely not. You give up quiet a bit to go full Android over the iPhone. The pros just don&#8217;t outweigh the cons.</p>
<p>The only reason I could recommend a Nexus over an iPhone is if you&#8217;re heavily invested in Google apps, Gmail, Google Voice, Picasa etc. With that in mind, Nexus is competing against the iPhone 3GS, not the iPhone HD (or 4g) and iPhone OS 3.2. We&#8217;ll see what Apple has up their sleeve on Thursday and this June. </p>
]]></content:encoded>
			<wfw:commentRss>http://waynepan.com/2010/04/06/switching-to-androidnexus-one-from-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2009 Predictions Retrospective</title>
		<link>http://waynepan.com/2009/12/29/2009-predictions-retrospective/</link>
		<comments>http://waynepan.com/2009/12/29/2009-predictions-retrospective/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 00:45:55 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[digg]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[predictions]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://waynepan.com/?p=440</guid>
		<description><![CDATA[2009 is ending, a year that started with Sequoia&#8217;s RIP: Good Times fresh in everybody&#8217;s mind. However, 2009 saw some major M&#038;A activity. I made some predictions at the beginning of the year, let&#8217;s see how they played out. Last &#8230; <a href="http://waynepan.com/2009/12/29/2009-predictions-retrospective/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>2009 is ending, a year that started with <a href="http://venturebeat.com/2008/10/10/the-sequoia-rip-good-times-presentation-get-your-copy-here/">Sequoia&#8217;s RIP: Good Times</a> fresh in everybody&#8217;s mind. However, 2009 saw some <a href="http://www.techcrunch.com/2009/12/18/top-tech-acquisitions-2009/">major M&#038;A activity</a>. </p>
<p>I made some <a href="http://waynepan.com/2009/01/03/2009-predictions/">predictions at the beginning of the year</a>, let&#8217;s see how they played out. Last year I was 50% correct&#8230;</p>
<ul>
<li><b>Twitter will not be acquired</b> &#8211; <span style='color: green'>Correct!</span> Many people measure the success of Twitter in terms of traffic to twitter.com, but traffic isn&#8217;t what Twitter wants. Twitter is a platform and as Jack put it <a href="http://blogs.wsj.com/digits/2009/06/03/twitter-a-success-when-people-stop-talking-about-it-co-founder-says/">&#8220;Twitter’s a success for us when people stop talking about it&#8221;</a>. I also predicted that Twitter would get their first sniff of revenue this year and <a href="http://www.techcrunch.com/2009/11/20/realtime-crunchup-twitter-coo/">they did</a> in the form of search deals with Bing and Google.</li>
<li><b>Digg will not be acquired</b> &#8211; <span style='color: green'>Correct!</span> Digg&#8217;s appeal as an acquisition target went up threefold when they launched their <a href="http://about.digg.com/blog/ads-you-can-digg…or-bury">innovate ad platform</a>. No numbers have been released but as an avid Digger, the platform definitely works. I&#8217;ve clicked on my fair share of Digg ads simply because they appealed to me.</li>
<li><b>Apple will open up iTunes infrastructure to developers to start accepting micro-payments</b> &#8211; <span style=' color: red'>Wrong!</span> Apple did do something around payments, they enabled app developers to charge or in-app purchases in free apps. One step closer to opening up their payment platform. If Apple did this, <a href="https://squareup.com/">Square</a> would be belly up.</li>
<li><b>Android phones sales will not exceed iPhones, maybe in 2010</b> &#8211; <span style='color: green'>Correct!</span> <a href="http://metrics.admob.com/wp-content/uploads/2009/11/AdMob-Mobile-Metrics-Oct-09.pdf">AdMob&#8217;s latest metrics report</a>, which measures <u>ad requests not marketshare</u> it&#8217;s clear Apple still has a substantial lead. Even based off ad requests it&#8217;s clear Android is no where near Apple and for this purpose, I&#8217;m calling it good enough.
<p>I guess I&#8217;m lucky that Google hasn&#8217;t released the Nexus One yet. Next year I definitely think Android will have a great marketshare than the iPhone purely based off the number of Android devices (low cost at that too) emerging.</li>
<li><b>Facebook connect will become more ubiquitous than OpenID as a way to login to websites</b> &#8211; <span style='color: green'>Correct!</span> Facebook says <a href="http://www.facebook.com/press/info.php?statistics">80,000</a> websites have implemented Facebook Connect. The best number I can find for OpenID is <a href="http://www.janrain.com/openid">25,000</a>. Yahoo will soon use Facebook for it&#8217;s social features, Facebook&#8217;s platform will only continue to grow.</li>
<li><b>IE6 marketshare will fall under 10% by years end</b> &#8211; <span style=' color: red'>Wrong!</span> <a href="http://marketshare.hitslink.com/browser-market-share.aspx?qprid=2&#038;qpmr=40&#038;qpdt=1&#038;qpct=3&#038;qptimeframe=M">IE6 still holds at 22%</a>, and I still cry everyday. </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://waynepan.com/2009/12/29/2009-predictions-retrospective/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why Apple Needs to Make a iPhone Keyboard</title>
		<link>http://waynepan.com/2009/06/21/why-apple-needs-to-make-a-iphone-keyboard/</link>
		<comments>http://waynepan.com/2009/06/21/why-apple-needs-to-make-a-iphone-keyboard/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 10:14:36 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://waynepan.com/2009/06/21/why-apple-needs-to-make-a-iphone-keyboard/</guid>
		<description><![CDATA[Apple needs to introduce a physical keyboard attachment for the iPhone. With the 3.0, Apple gave developers access to the connector and it&#8217;s inevitable that devs will want to start supporting physical inputs in their apps. This would be so &#8230; <a href="http://waynepan.com/2009/06/21/why-apple-needs-to-make-a-iphone-keyboard/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Apple needs to introduce a physical keyboard attachment for the iPhone. With the 3.0, Apple gave developers access to the connector and it&#8217;s inevitable that devs will want to start supporting physical inputs in their apps. This would be so much easier if Apple said okay here&#8217;s the keyboard and here is a standardized API to use. Consumers and developers both win.  </p>
<p>Let&#8217;s imagine Apple doesn&#8217;t do an OEM keyboard. A third party manufacture is going to fill the space but who will it be? Which apps support it? What if there are multiple keyboards that each work with different apps? Am I, as a consumer, going to have to decide which one to buy and hope my favorite apps support it?</p>
<p>The scenario above could be absolutely avoid if Apple puts out their own keyboard. If Apple is serious about the iPhone being a gaming platform then a gamepad would be nice too. </p>
]]></content:encoded>
			<wfw:commentRss>http://waynepan.com/2009/06/21/why-apple-needs-to-make-a-iphone-keyboard/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iPhone 3.0 now with SquirrelFish Extreme?</title>
		<link>http://waynepan.com/2009/03/24/iphone-30-javascript-performance/</link>
		<comments>http://waynepan.com/2009/03/24/iphone-30-javascript-performance/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 23:08:11 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://waynepan.com/?p=368</guid>
		<description><![CDATA[I saw a post on Ajaxian about how iPhone 3.0 might now include SquirrelFish Extreme so I did a quick and dirty using this. Here&#8217;s are the results (raw spreadsheet here). iPhone 3.0 definitely has something, (whether it&#8217;s SquirrelFish or &#8230; <a href="http://waynepan.com/2009/03/24/iphone-30-javascript-performance/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I saw a post on <a href=" http://ajaxian.com/archives/iphone-30-now-with-squirrelfish-extreme">Ajaxian</a> about how iPhone 3.0 might now include SquirrelFish Extreme so I did a quick and dirty using <a href="http://furbo.org/stuff/benchmark.html">this</a>. Here&#8217;s are the results (raw spreadsheet <a href="http://spreadsheets.google.com/pub?key=pWzvxp6lpa4mvXkNtPz2dFg">here</a>).<br />
<img src="http://spreadsheets.google.com/pub?key=pWzvxp6lpa4mvXkNtPz2dFg&#038;oid=1&#038;output=image" /></p>
<p>iPhone 3.0 definitely has something, (whether it&#8217;s SquirrelFish or Nitro), but it&#8217;s 3x-10x faster than iPhone 2.2.</p>
<p>Update: <i>Dear Apple</i>, if this is against the NDA shoot me an email waynepan at me dot com <img src='http://waynepan.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://waynepan.com/2009/03/24/iphone-30-javascript-performance/feed/</wfw:commentRss>
		<slash:comments>47</slash:comments>
		</item>
		<item>
		<title>Apple Actually Fixes A Bug, How About Another?</title>
		<link>http://waynepan.com/2008/11/24/apple-actually-fixes-a-bug-how-about-another/</link>
		<comments>http://waynepan.com/2008/11/24/apple-actually-fixes-a-bug-how-about-another/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 03:31:45 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://waynepan.com/?p=293</guid>
		<description><![CDATA[Earlier this year, when I was developing the AdMob iPhone Ad Units, I ran into a curious bug involving iFrames and CSS Transforms. I didn&#8217;t think anything of the bug at the time other than it just seemed wrong. We &#8230; <a href="http://waynepan.com/2008/11/24/apple-actually-fixes-a-bug-how-about-another/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Earlier this year, when I was developing the <a href="http://www.admob.com/iphone">AdMob iPhone Ad Units</a>, I ran into a curious bug involving iFrames and CSS Transforms. I didn&#8217;t think anything of the bug at the time other than it just seemed wrong. We abandoned some of our ideas because of this bug so I filed it away and moved on.</p>
<p>Fast forward a few months to the <a href="http://www.iphonedevcamp.org/">iPhoneDevCamp</a> where I met John Resig for the first time. We chatted a bit about the iPhone and mentioned off hand about the bug I ran across. He, excitedly, wanted to see the bug in action and I whipped up a <a href="http://www.waynepan.com/iphone/fb.html">small demo</a> page and showed him. Later on that day he caught up with me and mentioned that he discovered that it was far more severe than he had originally thought and that he filed a bug against Apple.</p>
<p>That bug has now been fixed in iPhone 2.2 and Resig has a full write up <a href="http://ejohn.org/blog/clickjacking-iphone-attack/">here</a>. (I don&#8217;t think Apple would&#8217;ve fixed this bug if I had been the one to report it so I&#8217;m happy that Resig was able to bring it to their attention.)</p>
<p>There was another bug I ran into regarding iFrames and touch events. Curiously enough, touchevents do not register properly in iFrames. This <a href="http://waynepan.com/iphone/">first test [http://waynepan.com/iphone/]</a> demonstrates that you first must touch the parent document before touching the iFrame for the iFrame to register your touch event. The <a href="http://waynepan.com/iphone/touchtest2.html">second test [http://waynepan.com/iphone/touchtest2.html]</a> shows that touch events only register in an iFrame for the top ~100px of the entire page. The problem is best illustrated by visiting those links on your iPhone. </p>
<p>These bugs are not security showstoppers, like the click-jacking bug, but they do prevent web app developers from doing cool things in iFrames. We were originally going to use touch start, change, and end events to cycle through ads or give the user the ability to hide them. Ultimately, it was not possible because the iFrame was not receiving the proper events.</p>
<p>So far these have not been fixed in iPhone 2.2 and I still have bug into Apple for this (radar id: 6089245).</p>
]]></content:encoded>
			<wfw:commentRss>http://waynepan.com/2008/11/24/apple-actually-fixes-a-bug-how-about-another/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>iPhone Web App Performance Tip &#8211; Use Inline Images</title>
		<link>http://waynepan.com/2008/08/26/iphone-web-app-performance-tip-use-inline-images/</link>
		<comments>http://waynepan.com/2008/08/26/iphone-web-app-performance-tip-use-inline-images/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 01:42:27 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://waynepan.com/?p=207</guid>
		<description><![CDATA[Inline images use the data: URL scheme to embed the image data in the actual page. This can increase the size of your HTML document. Combining inline images into your (cached) stylesheets is a way to reduce HTTP requests and &#8230; <a href="http://waynepan.com/2008/08/26/iphone-web-app-performance-tip-use-inline-images/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<blockquote><p>Inline images use the data: URL scheme to embed the image data in the actual page. This can increase the size of your HTML document. Combining inline images into your (cached) stylesheets is a way to reduce HTTP requests and avoid increasing the size of your pages. Inline images are not yet supported across all major browsers.</p></blockquote>
<p><i><a href="http://developer.yahoo.com/performance/rules.html#num_http">Performance Best Practices at Yahoo!</a></i></p>
<p>Reducing the number of connections is critical for client side performance. Due to the nature of mobile and mobile networks the problem is only amplified. A low hanging fruit has always been moving to css sprites for all your graphical resources. A lot of developers haven&#8217;t moved to inline images because not all browsers support it. However, web app developers on the iPhone have it much easier. We only have one browser to worry about, and luckily for us, it&#8217;s a good one. </p>
<p>It means that we can safely inline images and reduce the number of requests an iPhone user has to make across EDGE/3G.</p>
<p>Let&#8217;s take a look at the newly launched <a href="http://iphone.cnet.com">iphone.cnet.com</a>:<br />
<img src="http://waynepan.com/wp-content/uploads/2008/08/cnet-iphone1.png" alt="" title="cnet-iphone1" width="500" height="482" class="alignnone size-full wp-image-209" /></p>
<p>There are 26 requests total for this page. If we take all the img tags and replace the src with the base64 encoded inline image we can reduce the number of requests to 13. </p>
<pre class='brush:html'>
&lt;img src="http://i.i.com.com/cnwk.1d/i/wdgt/ipr/back-button-tip.png" border="0" align="left" /&gt;
to...
&lt;img src="data:image/png;base64,iVBORw0KGgottA ... SuQmCC" border="0" align="left" /&gt;
</pre>
<p>If we do this for all C|NET owned assets (css and js files) then we can get it down to <b>6 requests</b>!</p>
<pre class='brush:html'>
&lt;link rel="stylesheet" type="text/css" href="http://i.i.com.com/cnwk.1d/css/rb/wdgt/iphone/iphone-reviews.css" /&gt;
to...
&lt;link rel="stylesheet" type="text/css" href="data:text/css;base64,Ym9keSB7CglvdmVyZmsb2F0OiBs...YmxvY2s7Cn0%3D" /&gt;
</pre>
<p>You can view these on your iPhone (or your browser) and see the performance difference:</p>
<ul>
<li><a href="http://www.waynepan.com/s/cnet1.html">Original C|NET</a> &#8211; 26 requests</li>
<li><a href="http://www.waynepan.com/s/cnet2.html">Inline Images C|NET</a> &#8211; 13 requests</li>
<li><a href="http://www.waynepan.com/s/cnet3.html">Inline (almost) Everything C|NET</a> &#8211; 6 requests</li>
</ul>
<p>Any iPhone web app developer can do this right now in less than 30 mins. I used <a href="http://www.greywyvern.com/code/php/binary2base64">Grey Wyvern&#8217;s</a> tool, but here&#8217;s some down and dirty php code I whipped together for local files that does the same thing:</p>
<pre class='brush:php'>
< ?php
$options = getopt('f:');

if(empty($options['f']))
  die("\nUsage: php base64encode.php -f &gt;filename&lt;\n");

$ext_map = array(
  'png' => 'image/png',
  'gif' => 'image/gif',
  'jpg' => 'image/jpg',
  'css' => 'text/css',
  'js'  => 'text/javascript',
);
$file = $options['f'];
$ext = explode('.', $file);
$ext = $ext[count($ext) - 1];
if(empty($ext_map[$ext])) die("\nUnknown extension\n");

echo 'data:' . $ext_map[$ext] . ';base64,'
     . urlencode(base64_encode(file_get_contents($file))) . "\n";
</pre>
<p>So get out there, optimize, and save your users some valuable time!</p>
<p><b>Update</b>: There have been some questions of busting the iPhone cache with this technique. As was <a href="http://yuiblog.com/blog/2008/02/06/iphone-cacheability/">documented on the YUI Blog</a> the iPhone does not cache items over 25kb pre-gzip. If you&#8217;re going to use this technique just be aware that external resources linked are less than 25kb.</p>
]]></content:encoded>
			<wfw:commentRss>http://waynepan.com/2008/08/26/iphone-web-app-performance-tip-use-inline-images/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Pandora Now Dead To Me, Simplify Media Full of Win</title>
		<link>http://waynepan.com/2008/08/25/pandora-now-dead-to-me-simplify-media-full-of-win/</link>
		<comments>http://waynepan.com/2008/08/25/pandora-now-dead-to-me-simplify-media-full-of-win/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 21:13:32 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[pandora]]></category>
		<category><![CDATA[simplify]]></category>

		<guid isPermaLink="false">http://waynepan.com/?p=204</guid>
		<description><![CDATA[All the recent rumors circulating of Pandora&#8217;s demise, I started worry that my favorite iPhone app would soon be deactivated. Today, I do not care. Why? Because I downloaded and set up SimplifyMedia. Now I can stream home iTunes library &#8230; <a href="http://waynepan.com/2008/08/25/pandora-now-dead-to-me-simplify-media-full-of-win/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.simplifymedia.com/"><img src="http://waynepan.com/wp-content/uploads/2008/08/simplifymedia.png" alt="" title="simplifymedia" width="290" height="85" class="aright size-full wp-image-205" /></a><br />
All the recent rumors circulating of <a href="http://www.techcrunch.com/2008/08/16/perhaps-pandora-must-be-our-sacrificial-lamb/">Pandora&#8217;s demise</a>, I started worry that my favorite iPhone app would soon be deactivated. Today, I do not care.</p>
<p>Why? Because I downloaded and set up <a href="http://www.simplifymedia.com/">SimplifyMedia</a>. Now I can stream home iTunes library from anywhere! EDGE, 3G, WiFi, in my car, at the office, waiting in line&#8230; anywhere. My decision to save a $100 by going with the 8gb is going rather well. <img src='http://waynepan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Some tips for those with large iTunes libraries. Be patient and wait to Simplify to index all your music on your &#8220;server&#8221;. After that&#8217;s complete open up SimplifyMedia on your iPhone and <b>keep</b> it open. I was having trouble seeing all my songs on my iPhone but after I left the app open for 5 mins I was able to see my entire library.</p>
]]></content:encoded>
			<wfw:commentRss>http://waynepan.com/2008/08/25/pandora-now-dead-to-me-simplify-media-full-of-win/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>iPhone CSS Animations Thoughts and Issues</title>
		<link>http://waynepan.com/2008/08/08/iphone-css-animations-thoughts-and-issues/</link>
		<comments>http://waynepan.com/2008/08/08/iphone-css-animations-thoughts-and-issues/#comments</comments>
		<pubDate>Sat, 09 Aug 2008 00:29:22 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css animations]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[safari]]></category>

		<guid isPermaLink="false">http://waynepan.com/?p=151</guid>
		<description><![CDATA[I&#8217;ve been doing a lot of work with the iPhone lately and I&#8217;ve been holding back on blogging about my experiences because I&#8217;m unclear as to the damn NDA stipulations. NDA be damn, here&#8217;s a first in a series of &#8230; <a href="http://waynepan.com/2008/08/08/iphone-css-animations-thoughts-and-issues/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing a lot of work with the iPhone lately and I&#8217;ve been holding back on blogging about my experiences because I&#8217;m unclear as to the damn NDA stipulations. NDA be damn, here&#8217;s a first in a series of posts!</p>
<p>If you aren&#8217;t familiar with the new animation framework that&#8217;s built into Mobile Safari you can read about the closest thing on WebKit, <a href="http://webkit.org/blog/138/css-animation/">CSS transitions</a>. Here is an example of a CSS transition:</p>
<pre>
&lt;div style="-webkit-transition: opacity 2s ease-in"
  onclick="this.style.opacity='0'"&gt;
This div will do a fade when clicked only Safari 3.1 or on the iPhone!
&lt;/div&gt;
</pre>
<div style="-webkit-transition: opacity 2s ease-in; border: 1px blue dashed" onclick="this.style.opacity='0'">This div will do a fade when clicked Safari 3.1 or on the iPhone</div>
<p>Essentially you tie a timing function and duration when a css property is changed. CSS animations allow for more complex rule transitions. For example, if you want to have a card flipping effect show in this video, you will need to use CSS animations.<br />
<object width="325" height="244"><param name="movie" value="http://www.youtube.com/v/hM07-L0C48A&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/hM07-L0C48A&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="325" height="244"></embed></object><br />
<span id="more-151"></span><br />
CSS animations consist of a combination of 2 rules, one to define the animation timing, duration, and animation name. The second to define the actual animation.  </p>
<pre>
/* the following rules make something shrink from 50px */
/* to 10px then grow to 100px in 2 seconds */
.shrink-n-grow {
  -webkit-animation-name: 'shrink-n-grow-animation';
  -webkit-animation-timing-function: ease-in-out;
  -webkit-animation-duration: 2s;
}

@-webkit-keyframes shrink-n-grow-animation {
  from {
    height: 50px;
  }
  50% {
    height: 10px;
  }
  to {
    height: 100px;
  }
}
</pre>
<p>There are a few issues with the Mobile Safari CSS animation implementation and I urge Mozilla, the IE team, Opera, and W3C to consider these before writing their own spec.</p>
<h4>CSS means no syntax checking</h4>
<p><a href="http://snook.ca/archives/javascript/css_animations_in_safari/">Jonathan Snook</a> wrote about this last year and until I actually started using them I didn&#8217;t feel the pain. Since all the rules are written in CSS there is no error checking. Figuring out that you&#8217;re animation is broken because you misspelled -webkit-transition: is painful enough. When you start working with perspectives for translateZ, it will drive you utterly insane.</p>
<h4>Access through javascript problematic</h4>
<p>Also, because the rules live in CSS world, modifying existing rules on the fly in javascript requires you to use this ridiculous function to scan through CSS rules and find the one you want and then modifying a value.</p>
<pre>
  var findAnimation = function(name) {
      var ret_rule = null, sheets = document.styleSheets;
      for(var i = sheets.length - 1; i >= 0 ; i--) {
        var sheet = sheets[i];
          for(var j = sheet.cssRules.length - 1; j >= 0; j--) {
            var rule = sheet.cssRules[j];
              // 7 means the keyframe rule
              if(rule.type === 7 &#038;&#038; rule.name == name) {
                ret_rule = rule;
                break;
              }
            }
      }
      return ret_rule;
    }
  findAnimation('shrink-n-grow-animation').findRule(
     '50%').style.height = '25px'
</pre>
<h4>Needlessly complicated</h4>
<p>To use an animation, not only do you have to apply the final value of the animation if you want it to stick, but you have to perform some software olympics. </p>
<pre>
  // Add shrink-n-grow animation to a div
  var remove = function() { // we'll need this later
    // first, set final values
    theDiv.style.height = '100px';
    // then remove shrink-n-grow classname so that
    // it can be applied again animations are only
    // triggered when classnames are first applied
    theDiv.className = '';
    // remove this listener because webkitAnimationEnd
    // is triggered on every time ANY animation ends on theDiv
    theDiv.removeEventListener('webkitAnimationEnd', remove);
  };
  // listen for animation end
  theDiv.addEventListener('webkitAnimationEnd', remove);
  /// FINALLY, start the animation animation
  theDiv.className = 'shrink-n-grow';
</pre>
<p>That is just way too much code.</p>
<p>My personal preference is to have everything accessible in javascript so that the entire workflow of animation can live in javascript (instead of just modifying styles).</p>
]]></content:encoded>
			<wfw:commentRss>http://waynepan.com/2008/08/08/iphone-css-animations-thoughts-and-issues/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>EverNote, How To Lose a Customer In 2 Seconds</title>
		<link>http://waynepan.com/2008/08/07/evernote-how-to-lose-a-customer-in-2-seconds/</link>
		<comments>http://waynepan.com/2008/08/07/evernote-how-to-lose-a-customer-in-2-seconds/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 21:57:36 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[evernote]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://waynepan.com/?p=167</guid>
		<description><![CDATA[Is it just me or is there a definite lack of a good notes application on the iPhone. The built in Notes App is almost there except it doesn&#8217;t sync with MobileMe nor can I draw freehand on it! If &#8230; <a href="http://waynepan.com/2008/08/07/evernote-how-to-lose-a-customer-in-2-seconds/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Is it just me or is there a definite lack of a good notes application on the iPhone. The built in Notes App is almost there except it doesn&#8217;t sync with MobileMe nor can I draw freehand on it! If the Apple Notes App did that I won&#8217;t have to look for an alternative, however, I do, and I did.</p>
<p><img src="http://waynepan.com/wp-content/uploads/2008/08/evernote_logo.gif" alt="" title="evernote_logo" width="228" height="60" class="aright size-full wp-image-169" /><br />
I downloaded a promising looking app called <a href="http://www.evernote.com">EverNote</a>. It stores everything up in the cloud and all notes are completely indexed and searchable. You can save notes by taking a picture and it will OCR them. You can even save audio notes. All this, a OS X client, and iPhone client, and it&#8217;s FREE. I&#8217;m sold so I fire up the AppStore, download EverNote, and try to enter my first note. This is what I get:<br />
<img src="http://waynepan.com/wp-content/uploads/2008/08/evernote2.jpg" alt="" title="evernote"  class="alignnone wp-image-168" /></p>
<p>There seems to be a bug where the note you&#8217;re typing is covered which makes the <b>primary function of the app completely useless</b>. My bar for usability is definitely higher than the average joe, but considering this app is competing against an Apple pre-installed version EverNote&#8217;s bar should be just as high.</p>
<p>Meanwhile, I&#8217;ll just have to keep looking.</p>
]]></content:encoded>
			<wfw:commentRss>http://waynepan.com/2008/08/07/evernote-how-to-lose-a-customer-in-2-seconds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

