0

我有一个与 iOS 本机 webview 中的 cookie 有关的有趣问题。

当 Twitter、Pulse 和其他新闻阅读器等应用程序链接到我们的内容时,即使我们的 cookie 设置为 60 分钟,cookie 也不会保留在单个会话之外。

我的假设是每次加载一篇文章时都会加载一个新的 webview 实例并删除所有 cookie 数据,即使用户仍在同一个会话中。在 Android 上的相同应用程序中,cookie 在应用程序中的整个会话中持续存在,而不仅仅是 webview 会话。

有人在 iOS 上看到过这个问题吗?是否有可能在整个应用程序会话中持续存在的 cookie 的替代方法?

4

1 回答 1

1

This is expected behavior. iOS sandboxes application data including cookies. Some recommended reading:

Understanding cookie storage

Apple URL Loading System Overview

Where are an UIWebView's cookies stored?

于 2012-10-15T22:08:42.493 回答