PHPz2017-04-17 16:46:45
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.
迷茫2017-04-17 16:46:45
H5 pages are published together with the server, and there is no need to upgrade the app.
PHPz2017-04-17 16:46:45
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.