我有一个应用程序,在我的应用程序中有两个webview,我标记了webview_One和webview_Two。
webview_One access "http://localhost:12345:/a/index.html"
webview_Two access "http://localhost:12345:/b/index.html"
在/ index.html和b / index.html中我用localStorage来操作一个变量都是localStorage.test
但是,当我在/ index.html中更改localStorage.test时,在b / index.html中我获得了在/ index.html中更改的值
为什么每个webview都无法存储localStorage?
我想知道如何让每个webview存储每个webview itselfe localStorage值?
答案 0 :(得分:0)
WebKit仅使用一个数据库进行本地存储 - 查看WebSettings的文档
另一方面,sessionStorage可能会做你想要的,但你会丢失离开页面的数据