在PhoneGap IOS上缓存图像的最佳方法 [英] Best way to cache images on PhoneGap IOS

查看:95
本文介绍了在PhoneGap IOS上缓存图像的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个PhoneGap ios应用程序,用于使用JSON从服务器导入数据,此数据包含图像URL,我已经用于缓存本地存储中的数据,以便在应用程序不在Internet时使用它连接,但我有一个问题是什么是缓存图像的最佳方法。

I'm building a PhoneGap ios app that used to import data from the server using JSON, this data contains image URL, I have already used to cache the data in the local storage to use it when the application is out of internet connection but I have one concern is about what is the best way to cache images.

我正在考虑将图像转换为data-uri并将其保存到IOS DataBase。

I was thinking of converting the images to data-uri and save it to IOS DataBase.

请告知此解决方案是否可行或是否有其他最佳解决方案?

Please advice if this solution is doable or is there any other best solutions?

推荐答案

这篇博文应该让你走在正确的轨道上 https://www.raymondcamden.com/2012/01/19/Downloading-files-to-a-PhoneGap-application-Part-1/

This blog post should set you on the right track https://www.raymondcamden.com/2012/01/19/Downloading-files-to-a-PhoneGap-application-Part-1/

这篇关于在PhoneGap IOS上缓存图像的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆