【问题标题】:UIWebView clears cache After Application Exit & Not caching images offlineUIWebView 在应用程序退出后清除缓存并且不离线缓存图像
【发布时间】:2013-10-27 02:23:45
【问题描述】:
HTTP Response Header

Name    Value   Delim


Status:         HTTP/1.1 200 OK
Server:         Apache  
Content-Type:   image/jpeg  
Accept-Ranges:  bytes   
Last-Modified:  Wed, 16 Oct 2013 12:06:35 GMT   
Content-Length: 54556   
Cache-Control:  max-age=604800  
Expires:        Thu, 24 Oct 2013 09:32:54 GMT   
Date:           Thu, 17 Oct 2013 09:32:54 GMT   
Connection:     close

当我运行应用程序时,一旦一切正常运行,是的,图像被缓存为应用程序生命周期,但是当我关闭应用程序并在 WIFI 关闭的情况下再次运行时。图像不出现。它在 android 中工作正常,但在 iOS 应用程序中不工作。所有标题似乎都有效。

图片有效期为 7 天。 iOS 应将其缓存 7 天。

http://cdn.koimoi.com/wp-content/new-galleries/2013/10/Tanisha-Mukherjeen-in-Bigg-Boss-7-Pic-1.jpg

http://web-sniffer.net/

用于搜索优化的旧查询:iOs Phonegap 应用程序忽略缓存标头而不缓存图像

【问题讨论】:

  • 这方面有什么进展吗?我使用 Cordova 3.x(PhoneGap) 遇到了同样的问题。 Android 很好,完全符合预期。 iOS ......嗯,正如 abksharma 所描述的那样。

标签: android ios caching cordova uiwebview


【解决方案1】:

我们还能够通过 RNCachingURLProtocol 库进行离线缓存。请在线查看图书馆...唯一的缺点是它不会清除缓存。需要验证...

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-06-14
    • 2011-07-25
    • 2023-04-05
    • 1970-01-01
    • 2017-10-01
    • 2011-08-02
    • 2011-10-05
    • 1970-01-01
    相关资源
    最近更新 更多