In some cases, for example, the local signature verification for offline packages failed, the H5 container fails to locally obtain the required resources. The client will instead obtain the resources from online addresses. The basic process is as follows:
The client sends a request to the MDS server with IDs and local version numbers of all H5 apps that have been locally installed.
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
Package URL
andDownload configuration parameters
in the returned information.If the H5 container fails to locally obtain the offline package resources for some reason, the client needs to use the
fallback base URL
in the returned information. The container can use this URL to visit the online CDN for loading the H5 application resources, such as HTML, Javascript, and CSS files, but not amr files.
Procedures
The client obtained the offline package information and downloaded the amr file.
The client downloads H5 application resources from the fallback address.
Example of fallback mode log: 3-offline-package-fallback-example.chls.zip