In the page redirection scenario with network requests, the long delay is mainly caused by the long HTTP request time. Network requests are restricted by the operating system and external environment. Consequently, it is difficult to optimize the request speed in the service code. Therefore, a network request should be initiated in advance as much as possible.
When a web page is loaded slowly and the application is idle, you can use the pre-connection, pre-loading, and pre-rendering capabilities of the Web component to initialize the web engine and load pages in advance to improve the startup and response speed of the next page. For details about the principles and cases, see Performance Optimization Guide for Web Page Loading.
To reduce white blocks, you can pre-download online images and cache them in the application sandbox in advance. Therefore, the image download and decoding are executed before the component is created. When the Image component is loaded, the cached data can be obtained from the application sandbox. For a non-first request, the component will check whether cached image data exists in the application sandbox. This avoids repeated image download and thereby reduces duration of white screen or white blocks when large images are loaded, providing better user experience. For details about the principles and cases, see Solution for Image White Blocks.