最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

ios - When loading a .webarchive in WKWebView does it handle local storage differently? - Stack Overflow

programmeradmin2浏览0评论

I have multiple web views of the same domain that share the same local storage, as expected.
One of them though, is loading a .webarchive file for use when offline.
The web archive is of the same domain, and is loaded using the same base URL.

For some reason, in most cases, the local storage is not shared with this web view when loading the web archive, although if I make that same web view load the actual web page it does share local storage.

I say in most cases, because for some users it works as expected, but for a significant portion of users it isn't sharing.
I think that the main difference between working and not is iOS version. iOS 17 seems to be able to share the local storage but iOS 18 does not. I can't find anything related in the release notes of iOS 18 versions.

There is nothing in the documentation for load(_:mimeType:characterEncodingName:baseURL:), or the header file, that explains anything specific about local storage and webarchive loading.

Does anyone know for sure how local storage is handled when a webarchive is loaded into a web view, and did something change with iOS 18 in regards to this?

发布评论

评论列表(0)

  1. 暂无评论