This is a method to load more images than iPad Safari will naturally allow. The limit is around 6.5MB, after which Safari will silently fail to load any more images.
Based on work by Rob LaPlaca and Matt Bryson, this method has the added advantage that the images can be resized and still maintain their aspect ratio, without further JavaScript computation.
Tested on iOS 4.2.1. It looks like iOS 4.3 no longer has this limit; I've tried loading up to 50MB with no issues. I'd appreciate any feedback on how this method fairs on iOS 3.2.
(This demo HTML and cat pictures are also from Rob LaPlaca.)
--Jeff To
Changelog:
Loading 20 different (roughly half MB) images with canvas + img + bg
Kitties!