A Mobile Web Cache Optimization Method Based on HTML5 Application Caching
First Claim
1. A method for optimizing mobile web cache based on HTML5 application cache, comprising the steps of:
- 1) crawling resources of a mobile web application by a server at predetermined interval to obtain the resource information;
2) mapping the resources having same content but different URLs to a same resource by the server;
3) predicting a time duration in which each of the resources is to be unchanged based on the resource information;
selecting a stable set of resources to configure in a cache resource list in Manifest file associated with the HTML5 application cache; and
generate a resource mapping file to preserve mapping relationship between the resources and corresponding URLs;
4) setting a JavaScript runtime library;
invoking a call command for the JavaScript runtime library in each target page;
automatically blocking a URL resolution request of a target page when the target page is assessed by a client browser, wherein the target page is a page of a mobile web application, each target page associated with a number of resources; and
5) generating a proxy page for a target page;
redirecting URL of the target page to the corresponding proxy page;
accessing a target page through the client browser including a requested resource;
querying the resource mapping file according to the requested resource to find a mapped resource; and
retrieving a mapped resource from the cache resource list in the Manifest file and loading the mapped resource to the proxy page.
0 Assignments
0 Petitions
Accused Products
Abstract
The present invention discloses a mobile web cache optimization method including the steps of: 1) crawling the resource information in the mobile web application by a server; 2) mapping resources having the same content but different URLs to a same resource; 3) selecting a stable set of resources to configure in the cache resource list; 4) setting a JavaScript runtime library, invoking a call to the runtime in each target page; 5) generating a proxy page for each target page, redirecting URL of a target page to the corresponding proxy page, and when a target page is accessed, querying the resource mapping file according to the requested resource, and retrieving the matching cache resource from the cache resource list to load onto the proxy page. The disclosed method saves the access time and reduces data traffic of the mobile web application and improves user experience of the mobile devices.
26 Citations
8 Claims
-
1. A method for optimizing mobile web cache based on HTML5 application cache, comprising the steps of:
-
1) crawling resources of a mobile web application by a server at predetermined interval to obtain the resource information; 2) mapping the resources having same content but different URLs to a same resource by the server; 3) predicting a time duration in which each of the resources is to be unchanged based on the resource information;
selecting a stable set of resources to configure in a cache resource list in Manifest file associated with the HTML5 application cache; and
generate a resource mapping file to preserve mapping relationship between the resources and corresponding URLs;4) setting a JavaScript runtime library;
invoking a call command for the JavaScript runtime library in each target page;
automatically blocking a URL resolution request of a target page when the target page is assessed by a client browser, wherein the target page is a page of a mobile web application, each target page associated with a number of resources; and5) generating a proxy page for a target page;
redirecting URL of the target page to the corresponding proxy page;
accessing a target page through the client browser including a requested resource;
querying the resource mapping file according to the requested resource to find a mapped resource; and
retrieving a mapped resource from the cache resource list in the Manifest file and loading the mapped resource to the proxy page. - View Dependent Claims (2, 3, 5, 6, 7, 8)
-
-
4. The method of 1, wherein the step of mapping the resources having same content but different URLs to a same resource includes:
-
receiving a regular resource list Ht−
1 at time t−
1 and a detailed resource list Rt at time t;generating a regularized resource list Ht at time t; initializing the regularized resource list Ht at time t to the regularized resource list Ht−
1 at time t−
1;setting state of each resource to “
nonexistent”
;for each resource r in R, adding a record for r is added in Ht if there is no resource in Ht corresponds to r; if Ht includes a unique resource corresponding to r, mapping r to Ht and recalculating the regular expression of the resource r; and if Ht includes multiple resources corresponding to r, deleting the original mapping and adding a new record to Ht for r.
-
Specification