devedbox / AXWebViewController

AXWebViewController is a webViewController to browse web content inside applications. It’s a lightweight controller on iOS platform based on WKWebView (UIWebView would be the base Kit under iOS 8.0). It added navigation tool bar to refresh, go back, go forward and so on. It support the navigation style on WeChat. It is a simple-using and convenient web view controller using inside applications.
MIT License
798 stars 134 forks source link

重新加载无效 #62

Open liudding opened 6 years ago

liudding commented 6 years ago

问题

当网络请求出错时,显示 neterror.html 页面。但点击“重新加载“不会触发页面重载。

原因

neterror.html

<p class="detail_neor_btn" onClick="location='ax_network_error'">重新加载</p>

请求的 ax_network_error 会被视作相对路径,被拼接成

file:///app_path/AXWebViewController.bundle/html.bundle/ax_network_error

webView: decidePolicyForNavigationAction:decisionHandler: 里的判断是

if ([navigationAction.request.URL.absoluteString isEqualToString:kAX404NotFoundURLKey] || [navigationAction.request.URL.absoluteString isEqualToString:kAXNetworkErrorURLKey])

条件无法通过,导致重载无限。

devedbox commented 6 years ago

v0.7.1已发布.

ZhiHongTan commented 5 years ago

现在在用0.7.2版本,但当网络请求出错时,显示 neterror.html 页面。但点击“重新加载“还是不会触发页面重载。