We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
本地启动web server,那 window.location.href 肯定会改变成 localhost,如果H5页面针对这个做了逻辑:比如,针对 window.location.href 来判断H5的api环境,或者是第三方统计 JS 基于 window.location.href 来做页面埋点和流量分析,这些都会是问题。
The text was updated successfully, but these errors were encountered:
这种情况不要做这种离线包方案了,就访问线上页面,对缓存多做一些优化。
Sorry, something went wrong.
嗯,基于现有的项目,都已经是离线包了,很难说再转到非离线包。
我这边还是基于 URLProtocol 做了请求拦截,body 是在 h5 发送前缓存起来的,然后在native侧去获取,最后在URLProtocol发送时补上 body。
WKWebView 还用 URLProtocol 吗,使用私有 api 有被拒的风险怎么办?
目前没有被拒绝过,可以通过字符串拼接的形式使用私有api。
另外我也做了一个纯的 ajax hook 方案,是基于 jsbridge 去发送请求,当真有被拒的时候,可以切换到这套方式。
No branches or pull requests
本地启动web server,那 window.location.href 肯定会改变成 localhost,如果H5页面针对这个做了逻辑:比如,针对 window.location.href 来判断H5的api环境,或者是第三方统计 JS 基于 window.location.href 来做页面埋点和流量分析,这些都会是问题。
The text was updated successfully, but these errors were encountered: