Home  >  Q&A  >  body text

android - 原生app嵌入h5页面,怎么实现不升级app更新H5页面的CSS

黄舟黄舟2766 days ago504

reply all(4)I'll reply

  • PHPz

    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.

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 16:46:45

    Add a version distinction when linking

    reply
    0
  • 迷茫

    迷茫2017-04-17 16:46:45

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

    reply
    0
  • PHPz

    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.

    reply
    0
  • Cancelreply