UIWebView clears cache After Application Exit & Not caching images offline

痴心易碎 提交于 2019-12-24 13:13:15

问题


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

When I run the application Once everything runs Fine and Yes images are cached for Application Life Time, But when I close application and Run again with WIFI off. Image do Not appear. its working FINE in android and but is not working in iOS application. All headers seem valid.

The images have 7 days expiry. iOS should cache it for 7 days.

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

http://web-sniffer.net/

OLD QUERY For Search Optimization: iOs Phonegap application ignoring cache Headers and Not caching images


回答1:


We were also able to do the Offline caching via RNCachingURLProtocol Library. Please see online for the library...only drawback is it does not clear the cache. need to verify that...



来源:https://stackoverflow.com/questions/19446317/uiwebview-clears-cache-after-application-exit-not-caching-images-offline

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!