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

Template改变的时候,会存在白闪问题 #291

Closed huanting closed 5 years ago

huanting commented 5 years ago

What steps will reproduce the problem? 在Tempalte改变的时候,还是存在下面问题: 用户打开页面之后,先是看到历史页面,等用户准备去操作的时候,突然页面白闪一下,重新加载了一遍,这种体验非常差,特别在一些低端机器上,这个白闪的过程太明显,非常影响体验,这是用户和产品经理都不能接受的。

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

What version of the product are you using? On what operating system? 你正在使用产品的哪个版本?在什么操作系统上?

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

marlonlu commented 5 years ago

由于模板变更,dom结构体发生变化,如果需要让用户看到新的页面,需要重新刷新,这个体验的确比较糟糕 我们通用实践方案是通过 1 监控外网模板刷新比例,终端跟前端约定某个时机提前下发模板(demo里的预加载),降低模刷比例 2 针对某些不需要那么实时页面,可以指定模板不刷新: template-change: store字段