-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
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
Can I load local js and css resources, similar to shouldInterceptRequest in Android? #123
Comments
cef本身支持,但插件目前没有支持。 |
|
是的,想实现拦截很简单,但是需要我们完整的实现一个离线包或者离线资源缓存这样一个功能,需要完整的技术方案设计。我初步预计需要完成一些文件资源管理和白名单的功能,这需要一定的时间,如果你们有一些自己的页面想要快速加载,可以考虑直接做成本地页面加载,这种本来就是支持的。 |
您是说直接加载一个本地的HTML吗?然后HTML里再去引用本地的CSS和JS资源。 这个之前考虑过,但本地加载不是只能加载静态的HTML吗? 如果HTML里还有一些网络请求的话,是不是还得在本地起服务?这样就越来越麻烦了 还是有更便捷的方式我没考虑到?有的话可以给我个示例或提示 |
网络请求只要解决跨域的问题,通过命令行关闭 web security选项即可,该选项目前在最新的main分支上已经默认关闭的,参考这里 |
甚至本地页面的css和js是可以打包进html的,更方便管理。你们也可以在自己的代码上做一些替换本地文件的代码来做到热更新本地页面。 |
Can I intercept the js resources accessed by H5 and replace them with my local windows js resources? In this way, many resources such as js and css do not need to be downloaded remotely.
For example, the shouldInterceptRequest method in Android:
https://blog.csdn.net/sjdjdjdjahd/article/details/83550345
The text was updated successfully, but these errors were encountered: