lazycache.js
JavaScript local image cache for PhoneGap/Cordova and Chrome's HTML5 file API, co-authored by me with Christophe Benoit (2012-2013); loads images from cache first and updates element src to avoid repeat HTTP requests.
- BPM
- 154
- GRADE
- B
- LEVEL
- 6
- RELEASES
- 0
- YEARS
- 2012–2013
Images That Stayed Put
Hybrid apps in 2012 had an annoying problem. You'd scroll a list, the images would load, you'd scroll back, and the WebView would fetch every image again over a cell connection. Cordova was brand new and there wasn't much to lean on.
So I made lazycache.js, which wraps and extends Christophe Benoit's imgcache.js. I worked on it from April 2012 to April 2013, Apache licensed. It loads an image from the local cache first and only goes to the network if the file is missing, saving it on the way, and there's a jQuery plugin wrapper. It also worked in Chrome with the HTML5 file API.