Hacker News new | past | comments | ask | show | jobs | submit login
IPhone Web App Performance Tip - Use Inline Images (waynepan.com)
9 points by waynep on Aug 27, 2008 | hide | past | favorite | 10 comments



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.


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.


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.


Also, doesn't Safari on iPhone cache images? For those with a bandwidth cap, downloading all the images on every page could be quite heavy.

Not sure if this is a great idea if navigation involves multiple image-rich pages. Any idea?


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.


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.


Yes, the first letter of titles is always automatically capitalized by news.yc.


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


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”.


+1




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: