Web resource processing method and device
A web resource and processing method technology, applied in the field of web resource processing methods and devices, can solve the problems of limited capacity, elimination of http cache resources, etc., and achieve the effect of reducing redundancy
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
no. 1 example
[0043] image 3 It shows a flow chart of a method for processing webpage resources provided by the first embodiment of the present invention, please refer to image 3 , what this embodiment describes is the processing flow of the browser, and the method includes:
[0044] Step S110, receiving the web page resource obtained by the web server;
[0045] Step S120, according to the information of the webpage resource, generate the header cache data including the response header of the webpage resource and the text cache data including the response text of the webpage resource, the header cache data includes points to the The first key value of the above text cache data, the same text cache data has the same first key value;
[0046] The first key value includes: the type name of the webpage resource, a hash value calculated based on the response text of the webpage resource, and a character string generated after encoding.
[0047] For example, the format of the first key value...
no. 2 example
[0145] Figure 4 A flow chart of a method for processing web page resources provided by the second embodiment of the present invention is shown. see Figure 4 , this embodiment describes the browser's process of processing cache writing, and the method includes:
[0146] Step S210, receiving the web page resource obtained by the web server;
[0147] Step S220, judging whether the web page resource can be cached;
[0148] For whether a web page resource can be cached by HTTP, the browser can judge based on the HTTP response header and cache-related fields or whether verification is required. , the browser can determine that the webpage resource can be cached.
[0149] If yes, execute step S230. Otherwise, no caching is performed, that is, the cache writing process ends.
[0150] Step S230, judging whether the webpage resource meets a predetermined condition;
[0151] If the predetermined condition is met, perform step S240, otherwise, perform step S260.
[0152] Since t...
no. 3 example
[0168] Figure 5 It shows a flow chart of a method for processing webpage resources provided by the third embodiment of the present invention, please refer to Figure 5 , this embodiment describes the browser's process of processing cache reading, and the method includes:
[0169] Step S310, in response to the webpage resource loading request, use the unique resource identifier of the webpage resource to be loaded as the key value to query the corresponding effective cache data locally;
[0170] If the query result does not exist, execute step S320, and if the query result exists, execute step S330.
[0171] In step S320, request the webpage resource to be loaded from the web server, and then execute step S210 to enter the caching process, that is, the process described in the second embodiment, which will not be repeated here.
[0172] Step S330, parsing the found valid cache data;
[0173] Step S340, judging whether the format of the effective cache data conforms to the p...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


