Skip to content

diwu/WebViewDemo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

WebViewDemo


##### What's Page Cache?

Pgae Cache store DOM elements, javascript object and other object after webkit render html document.

https://webkit.org/blog/427/webkit-page-cache-i-the-basics/


##### Do UIWebView have Page Cache ?

UIWebView have Page Cache, that is include in WebBackForwardList. BUT default page cache size in UIWebView is ZERO, that make pageCache disable.

WKWebView's pageCache is enable default, but WKWebView could NOT be hijacked by NSURLProtocol.


##### How to enable Page Cache ?

Invoke WebPreferences's _postCacheModelChangedNotification method to post the "WebPreferencesCacheModelChangedInternalNotification" notification, make Page Cache enable.


##### Problem NOT resolved ?
I hack UCWeb, find it can hold 5 PageCache in iPhone6 iOS8.4.

But use my method, just 3 page may be cached.


My blog about how to find this solution. [**http://blog.csdn.net/wadahana/article/details/50168643**]

About

Enable Page Cache, which make webview NOT reload after goback or goforward.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 100.0%