我正在尝试编写一个 iphone Web 应用程序,在离线时显示来自小型 ish 数据库的信息。是否可以准备一个数据库并下载它,而不是以其他格式下载数据并在首次使用时创建它?
如果我必须创建数据库,什么是发送数据的好格式(例如压缩 xml?)?
本地数据库是否有最大存储限制?
You could either store it as a large chunk of XML, using HTML 5 Storage, or as a database using Web Database Storage - plain storage is better suported by web browsers (Latest Firefox only seems to suppor the former, for instance).
Secondly, there is no size limit defined in the HTML 5 standard - it simply states:
User agents should limit the total amount of space allowed for storage areas.
For more information, have a look at the HTML 5 Reference, or at these demos.
有关 html5 的更多信息,请参阅 html5 参考