Android system HTML5 resource local caching method
A local cache and resource technology, applied in the computer field, can solve the problems of not being able to effectively control the effectiveness of resource cache, prolong the display time of the application interface, occupy memory, etc., and achieve the effect of improving user experience, saving mobile phone traffic, and improving response speed
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Examples
Embodiment 1
[0015] Example 1: Assume that the server has an HTML5 page, and there is an image resource in the page, and the url is , the md5 digest of the url is e38ae4f3127f283a990a802bf4272232.
[0016] When WebView loads the page for the first time, WebView intercepts the intention to load image resources, and will first determine that the resource file e38ae4f3127f283a990a802bf4272232.png does not exist locally on the phone, and then load the page in the usual way, and at the same time, it will be loaded in the onLoadResource() method Download the resource file to the specified local directory of the mobile phone.
[0017] When WebView loads the page again, WebView intercepts the intention to load the image resource, and will first determine that the resource file e38ae4f3127f283a990a802bf4272232.png already exists locally on the mobile phone, and will not load the image resource from the server, but directly load it locally from the mobile phone This image resource "replaces" serve...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More