Tencent / VasSonic

VasSonic is a lightweight and high-performance Hybrid framework developed by tencent VAS team, which is intended to speed up the first screen of websites working on Android and iOS platform.
Other
11.8k stars 1.61k forks source link

Sonic没有拦截css、js、图片等资源吗? #268

Closed hy2012 closed 5 years ago

hy2012 commented 5 years ago

What steps will reproduce the problem? 该问题的重现步骤是什么?

  1. 当前shouldInterceptRequest 拦截并没有对css、js、图片等资源进行拦截是吗?为什么不考虑拦截这些资源缓存在本地,然后下次获取的时候从本地缓存取的逻辑呢,是出于什么考虑呢?

从源码看只有符合了isMatchCurrentUrl()方法的url被拦截,并且在拦截后wasInterceptInvoked被置为true,其他的资源如css、js、图片都不被拦截处理。

What is the expected output? What do you see instead? 你期待的结果是什么?实际看到的又是什么?

What version of the product are you using? On what operating system? Android8.0 Sonic3.0

Please provide any additional information below. 如果有的话,请在下面提供更多信息。

vasdeveloper commented 5 years ago

QQ上实践上通过页面直出,而且子资源拦截各个业务都有自己一套离线包机制,交由业务方自己控制