android - 原生app嵌入h5页面,怎么实现不升级app更新H5页面的CSS
黄舟
黄舟 2017-04-17 16:44:45
0
4
498
黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(4)
PHPzhong

This method requires native to create another synchronization function.
If the native cache is turned on, the web static resources will be released without overlay, and you can not only enjoy the local-like pleasure, but also be updated in a timely manner.

Added:

Easy to do: Create a new text or json file in the static server, write the version number in it, the version number is arbitrary, just change the version number when you want to update. Native pulls this file every time or regularly and stores the version number locally. When pulling later, it compares the local version number. If there are changes, it re-pulls the static resources to the local.

Better yet: When packaging static files, a changed file mapping table is generated. This table only has changed file names or addresses. Each time native pulls this mapping table, if a changed file is found, it will only pull the changed file.

Peter_Zhu

Add a version distinction when linking

迷茫

H5 pages are published together with the server, and there is no need to upgrade the app.

PHPzhong

The native part has a version synchronization mechanism with the server. Before opening the corresponding window, check whether it is consistent with the server version. If inconsistent, download the latest version of the resource file.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!