JavaScript module for doing browser image caching