[英]ipad web app load local image
Can a web app load an image from it's local store onto the webpage? Web应用可以将图像从本地商店加载到网页上吗?
Thanks 谢谢
What do you mean by "local store"? 你对“本地商店”是什么意思?
If you mean the HTML5 applicationCache, then yes, any images that are in the applicationCache are available for use online or offline. 如果您的意思是HTML5 applicationCache,那么是的,applicationCache中的任何图像都可以在线或离线使用。
If you mean from the Web SQL database or the localStorage API, then yes, but the images must be base64-encoded as text and then loaded as data URLs. 如果您的意思是来自Web SQL数据库或localStorage API,那么是,但图像必须以文本的形式进行base64编码,然后作为数据URL加载。
If you mean the photos in the user's personal collection on a mobile device or computer, then no, that's not possible. 如果您指的是移动设备或计算机上用户个人收藏中的照片,那么不,这是不可能的。
Use a manifest file. 使用清单文件。 Google it. 谷歌一下。
It's 2 lines of code and you need to declare it in your .htaccess file 它是2行代码,您需要在.htaccess文件中声明它
I should think not, as it can open vulnerable security risk: 我不应该这么想,因为它可以打开易受攻击的安全风险:
iPad doesn't have a storage directory like a PC (ie directory structure, eg home/user/*
structure). iPad没有像PC这样的存储目录(即目录结构,例如home/user/*
结构)。 Each application can store data that is only visible to the application (unless the application can allow sharing). 每个应用程序都可以存储仅对应用程序可见的数据(除非应用程序允许共享)。
It's better to store image on server machine and load images from there. 最好将图像存储在服务器计算机上并从那里加载图像。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.