ming1016 / STMURLCache

iOS预加载Web页面方案
MIT License
586 stars 80 forks source link

如何支持WKWebView cache #1

Open herbsun opened 7 years ago

debugcheck commented 7 years ago

@Herb-Sun 只能trick 使用 registerSchemeForCustomProtocol

ming1016 commented 7 years ago

这里有篇文章可以看看《让 WKWebView 支持 NSURLProtocol》 https://blog.yeatse.com/2016/10/26/support-nsurlprotocol-in-wkwebview/

huanglins commented 7 years ago

WKWebView 支持NSURLProtocol 后好像 网页内POST的请求会有问题,即使不处理,postData 也会被清除。

hxming2919 commented 7 years ago

STMURLProtocol 里的canInitWithRequest 为什么需要把非GET得方式过滤掉呢?POST不让发起请求吗?

LanCat commented 6 years ago

你这也算预加载??

guiqulaixi007 commented 6 years ago

@hxming2919 WKWebView Protocol 拦截会丢失post body参数