

IPhone Web App Performance Tip - Use Inline Images - waynep
http://waynepan.com/2008/08/26/iphone-web-app-performance-tip-use-inline-images/

======
tlrobinson
One thing to remember is Base64 encoding is less efficient than the raw
binary. Also, all modern web servers and browsers support reusing TCP
connections for multiple HTTP requests (though there is still the extra
latency for each actual request, just not the TCP connection sequence, etc)

I'd be interested to see actual benchmarks, rather than this "trust me, it
works" thing.

~~~
pmjordan
The Base64 issue should be relatively minor as long as you're gzip-encoding
everything your server sends. (the iPhone supports that, right?) Each base64
byte only has 6 bits of entropy so it'll compress well. I'd be more worried
about maintaining efficient caching with this technique.

~~~
tlrobinson
Good point. I did a quick test with a 190K PNG. Base64 encoded then gzipped it
was almost exactly the same size as the original gzipped.

------
geuis
First point: MUCH thanks to the author for this tip. The working examples
definitely showed the difference on my iPhone on edge.

Second point: who in the hell cares how the word "iPhone" is capitalized?
Really, is the most pertinent comment you can contribute about being a f*cking
grammar Nazi?

On a fun note, the iPhone makes sure you cap the "P" automatically. It doesn't
care about the caps on microsoft.

------
whalesalad
Can we please, _please_ start referring to the iPhone as it's actually
called... _i_Phone, not Iphone or IPhone or I-Phone. Lowercase i, uppercase
Phone.

iPhone.

I'm starting to think that News.YC does this automagically... someone help a
brother out here.

~~~
waynep
YC News does it automatically. I cut and paste the title from my blog (where I
have it and will always spell it iPhone).

~~~
DougBTX
Apparently we need some magic from here:
<http://daringfireball.net/2008/05/title_case>

Specifically: _The script assumes that words with capitalized letters other
than the first character are already correctly capitalized. This means it will
leave a word like “iTunes” alone, rather than mangling it into “ITunes” or,
worse, “Itunes”._

