为PhoneGap的应用程序的本地存储在Android设备上分开内置浏览器? [英] Is local storage for a Phonegap app on an Android device separate from the built in browser?

查看:182
本文介绍了为PhoneGap的应用程序的本地存储在Android设备上分开内置浏览器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题本质上是一个跟进或澄清这个问题

My question is essentially a follow up or clarification to this question.

我有使用JavaScript和 Adob​​e的PhoneGap的构建服务的Andr​​oid应用程序建成,我使用本地存储来存储数据上的设备。

I have an Android app built using Javascript and Adobe's Phonegap Build service, and I'm using "local storage" to store data on the device.

这是另外一个问题,我才知道,存储在本地存储的数据基本上是永久性的,因为它会留在设备上无限期,除非用户手动清除缓存的应用程序,作用于它或删除应用程序(也许其他异常情况,我很愿意忍受)。

From that other question, I learned that data stored in local storage is essentially "permanent", in that it will stay on the device indefinitely, unless the user acts on it by manually clearing the cache for the app or deletes the app (and maybe other unusual circumstances that I'm willing to live with).

不过,接受的答案的部分是困惑,我在它开始模糊谈论之间的界限手机的浏览器,并谈论PhoneGap的应用程序。

However, part of the accepted answer was confusing to me in that it started to blur the lines between talking about the phone's browser and talking about a Phonegap app.

如果使用的PhoneGap Android上的应用程序使用的一样的高速缓存内置浏览器的手机的什么我不清楚是。 PhoneGap的是本质上现有的浏览器工具的延伸,或者是它自己的独立的独立和自给自足的浏览器?

What is unclear to me is if an app on Android using Phonegap uses the same cache as the phone's built in browser. Is Phonegap essentially an extension of the existing browser facility, or is it it's own separate stand-alone and self contained browser?

重要的是,如果用户清除缓存在浏览器,将这种影响已安装的应用程序的基础上的PhoneGap?

Critically, if a user clears the cache in their browser, will that impact an installed app based on Phonegap?

推荐答案

由于PhoneGap的使用Webiview来呈现你的应用程序:的的WebView和PhoneGap的

Since Phonegap uses Webiview to render your app : WebView and Phonegap.

和出于安全原因,使用的WebView 都有自己的缓存和历史记录每个应用程序。 没有用户或OS希望这些数据由第三方应用程序访问。 因此,概括地说,您的应用程序将保持自己的历史和数据的缓存文件夹,并在下列情形之一的将被删除:

And For security reason each app that uses WebView has its own cache and history. "No User or OS wants such data to be accessed by 3rd party applications". So in a nutshell, your app will keep its own history and data in its cache folder and will be deleted in one of the following cases:

  • 用户手动删除它们。
  • 在用户使用的应用程序,设置屏幕和删除它们。
  • 应用程序卸载。

要了解更多关于这一点。需要看的WebView缓存: Cookie和窗口管理

To read more about this. take look at WebView cache : Cookie and window management

这篇关于为PhoneGap的应用程序的本地存储在Android设备上分开内置浏览器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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