Reputation: 12885
If the environment is a WebKit browser with stuff like Local Storage or Web SQL DB is there any way I can use JavaScript to save this image (not the url):
I'd like to be able to go offline and load this image for later use from the device using something like file:///my_app/offline_images/f71Gk.jpg
(kind of like a guaranteed cache).
EDIT The image could come from any website so having a php script return base64 encoded is not possible.
Upvotes: 1
Views: 1393
Reputation: 459
You can do it using this JQuery plugin - http://dumitruglavan.com/jquery-image-cache-plugin-cache-images-in-browsers-local-storage/
Upvotes: 1