mPaaS client framework encapsulates the download behavior of offline packages in depth. Therefore, developers do not directly control the download behavior of offline packages. The download process of offline packages is as follows:
- The client sends a request to the MDS server (cn-hangzhou-component-gw.cloud.alipay.com), which provides the ID of the target H5 app to be downloaded.
- If the offline package exists, the server returns related information.
- The client takes the initiative to download the amr file of the offline package based on the
Download configuration parametersin the returned information.
Request offline package information.
Return offline package information.
The client downloads the corresponding amr file according to the Package URL of the offline package obtained in the previous step.
Example of offline package download log: 1-offline-package-download-example.chls.zip