A front-end resource loading method and device
A resource and local resource technology, applied in the computer field, can solve problems such as blocked rendering, disordered page layout, and reduced efficiency, and achieve the effect of increasing speed and reducing traffic usage
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
no. 1 example
[0049] see image 3 , is a front-end resource loading method provided by the first embodiment of the present invention, which can be applied to figure 1 In the mobile terminal 100 shown, realize client-based front-end resource loading, the method includes:
[0050] S101. The client acquires and parses the webpage document of the target site, and the webpage document contains description information of front-end resources to be loaded;
[0051] A user accesses a WEB APP installed on a client. For ease of description, the embodiment of the present invention takes a browser APP installed on a smart phone as an example.
[0052] The user accesses the browser APP, and the browser APP obtains and parses the webpage document of the target site, wherein the target site may be a site corresponding to resource content on the homepage of the browser APP, and the webpage document may be an HTML document. The web page document includes description information of the front-end resources t...
no. 2 example
[0064] see Figure 4 , provides a front-end resource loading method for the second embodiment of the present invention, which can be applied to figure 1 In the mobile terminal 100 shown, realize client-based front-end resource loading, the method includes:
[0065] S201. The client acquires and parses the webpage document of the target site, and the webpage document contains description information of front-end resources to be loaded;
[0066] When the user accesses the browser APP, the browser APP acquires and parses the webpage document of the target site through the HTTP protocol, wherein the target site is a site corresponding to the resource content on the homepage of the browser APP, and the webpage document may be an HTML document. The web page document includes description information of the front-end resources to be loaded. The front-end resources to be loaded are the minimum set required for a single-page WEB APP to be executed smoothly, and are usually javaScript ...
no. 3 example
[0091] see Figure 5 , which provides a front-end resource loading device according to the third embodiment of the present invention. Such as Figure 5 As shown, the front-end resource loading device 40 includes:
[0092] An acquisition module 401, configured to acquire a web page document of the target site, the web page document includes description information of front-end resources to be loaded;
[0093] A parsing module 402, configured to parse the webpage document of the target site obtained by the acquiring module 401;
[0094] A judging module 403, configured to judge whether the to-be-loaded front-end resource is locally stored according to the description information of the to-be-loaded front-end resource;
[0095] The reading module 404 is configured to read the front-end resource to be loaded if the judging module 403 judges that the front-end resource to be loaded is locally stored;
[0096] The adding module 405 is used to add the locally stored front-end res...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


