CN108280111B - Page processing method, device, user terminal and storage medium - Google Patents

Page processing method, device, user terminal and storage medium Download PDF

Info

Publication number
CN108280111B
CN108280111B CN201710445182.7A CN201710445182A CN108280111B CN 108280111 B CN108280111 B CN 108280111B CN 201710445182 A CN201710445182 A CN 201710445182A CN 108280111 B CN108280111 B CN 108280111B
Authority
CN
China
Prior art keywords
sub
main document
resource
cache
strategy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710445182.7A
Other languages
Chinese (zh)
Other versions
CN108280111A (en
Inventor
刘翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Alibaba China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN201710445182.7A priority Critical patent/CN108280111B/en
Publication of CN108280111A publication Critical patent/CN108280111A/en
Application granted granted Critical
Publication of CN108280111B publication Critical patent/CN108280111B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a page processing method, a page processing device, a user terminal and a storage medium, and relates to the technical field of Internet. The method comprises the following steps: the method comprises the steps that a client side obtains a page cache strategy control head part of a main document returned by a server, wherein the page cache strategy control head part carries a cache strategy of the main document; generating a caching strategy of a sub-resource of the main document based on the caching strategy of the main document; and acquiring the sub-resources based on the caching strategy of the sub-resources. By the method, the cache strategy of the corresponding sub-document can be generated according to the page cache strategy control head of the main document, and the cache control is more flexible.

Description

Page processing method, device, user terminal and storage medium
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a page processing method, an apparatus, a user terminal, and a storage medium.
Background
The conventional cache policy control is performed for a certain resource request, that is, the cache policy control header of the resource a cannot control the cache policy of the resource B. The cache policy control header may control under what conditions the resource may cache the response and for how long, the cached resource is controlled by the cache policy control header before it has not expired.
In practical situations, we often encounter situations where it is necessary to update some local sub-resource that has not expired. For example, a serious problem exists in a certain sub-resource, and although the network resource is corrected, the sub-resource cached in the local cannot be updated before the sub-resource is not expired, and the sub-resource which is not corrected is still accessed.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a page processing method, a page processing apparatus and a user terminal to solve the above problems.
In a first aspect, an embodiment of the present invention provides a page processing method, where the method includes: the method comprises the steps that a client side obtains a page cache strategy control head part of a main document returned by a server, wherein the page cache strategy control head part carries a cache strategy of the main document; generating a caching strategy of a sub-resource of the main document based on the caching strategy of the main document; and acquiring the sub-resources based on the caching strategy of the sub-resources.
In a second aspect, an embodiment of the present invention provides a page processing apparatus, where the apparatus includes: the device comprises a first acquisition module, a generation module and a second acquisition module. The first acquisition module is used for acquiring a page cache policy control head of a main document returned by a server, wherein the page cache policy control head carries a cache policy of the main document; the generation module is used for generating a cache strategy of the sub-resource of the main document based on the cache strategy of the main document; and the second obtaining module is used for obtaining the sub-resources based on the cache strategy of the sub-resources.
In a third aspect, an embodiment of the present invention provides a user terminal, including a processor and a memory, where the memory is coupled to the processor, and the memory stores instructions that, when executed by the processor, the user terminal performs the following operations: the user terminal obtains a page cache strategy control head of a main document returned by a server, wherein the page cache strategy control head carries a cache strategy of the main document; generating a caching strategy of a sub-resource of the main document based on the caching strategy of the main document; and acquiring the sub-resources based on the caching strategy of the sub-resources.
In a fourth aspect, the present invention provides a computer-readable storage medium storing program code executable by a processor, the program code being configured to cause the processor to execute the above method.
Compared with the prior art, the page processing method, the page processing device, the user terminal and the storage medium provided by the embodiments of the invention have the following beneficial effects: and generating a cache strategy of the sub-resource of the main document by utilizing the page cache strategy control head of the main document, and acquiring the sub-resource according to the cache strategy of the sub-resource. By the method, the cache strategy of the corresponding sub-document can be generated according to the page cache strategy control head of the main document, and the cache control is more flexible.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic diagram illustrating interaction between a server and a user terminal according to an embodiment of the present invention;
fig. 2 is a block diagram of a user terminal according to an embodiment of the present invention;
fig. 3 is a flowchart of a page processing method according to a first embodiment of the present invention;
FIG. 4 is a flowchart of a page processing method according to a second embodiment of the present invention;
fig. 5 is a block diagram of a page processing apparatus according to a third embodiment of the present invention;
fig. 6 is a block diagram of a page processing apparatus according to a fourth embodiment of the present invention.
Detailed Description
Fig. 1 is a schematic diagram illustrating interaction between a user terminal 100 and a server 200 according to an embodiment of the present invention. The server 200 is communicatively coupled to one or more user terminals 100 via a network 300 for data communication or interaction. The server 200 may be an independent server such as a web server, a database server, a web server, or an integrated server composed of a plurality of independent servers. The user terminal 100 may be a Personal Computer (PC), a tablet PC, a smart phone, a Personal Digital Assistant (PDA), and the like.
Fig. 2 is a block diagram of the user terminal 100. The user terminal 100 includes: page processing means, a memory 110, a memory controller 120, a processor 130, a peripheral interface 140, an input-output unit 150, an audio unit 160, a display unit 170.
The memory 110, the memory controller 120, the processor 130, the peripheral interface 140, the input/output unit 150, the audio unit 160, and the display unit 170 are electrically connected to each other directly or indirectly, so as to implement data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The page processing means includes at least one software function module which may be stored in the memory 110 in the form of software or firmware (firmware) or solidified in an Operating System (OS) of the client device. The processor 130 is used to execute executable modules stored in the memory 110, such as software functional modules or computer programs included in the page processing apparatus.
The Memory 110 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 110 is used for storing a program, and the processor 130 executes the program after receiving an execution instruction, for example, in an embodiment of the present invention, when the program is executed by the processor 130, the user terminal 100 may perform: acquiring a page cache policy control header of a main document returned by a server, wherein the page cache policy control header carries a cache policy of the main document; generating a caching strategy of a sub-resource of the main document based on the caching strategy of the main document; and acquiring the sub-resources based on the caching strategy of the sub-resources. The method executed by the ue 100 defined by the process disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 130, or implemented by the processor 130.
The processor 130 may be an integrated circuit chip having signal processing capabilities. The Processor 130 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The peripheral interface 140 couples various input/output devices to the processor 130 and to the memory 110. In some embodiments, peripheral interface 140, processor 130, and memory controller 120 may be implemented in a single chip. In other examples, they may be implemented separately from the individual chips.
The input and output unit 150 is used for providing input data to the user to realize the user interaction with the user terminal 100. The input/output unit 150 may be, but is not limited to, a mouse, a keyboard, and the like.
Audio unit 160 provides an audio interface to a user that may include one or more microphones, one or more speakers, and audio circuitry.
The display unit 170 provides an interactive interface (e.g., a user operation interface) between the user terminal 100 and the user or is used to display image data to the user reference. In this embodiment, the display unit 170 may be a liquid crystal display or a touch display. In the case of a touch display, the display can be a capacitive touch screen or a resistive touch screen, which supports single-point and multi-point touch operations. Supporting single-point and multi-point touch operations means that the touch display can sense touch operations from one or more locations on the touch display at the same time, and the sensed touch operations are sent to the processor 130 for calculation and processing.
It is to be understood that the structure shown in fig. 2 is merely illustrative, and the user terminal 100 may also include more or fewer components than shown in fig. 2, or have a different configuration than shown in fig. 2. The components shown in fig. 2 may be implemented in hardware, software, or a combination thereof.
In the embodiment of the present invention, the user terminal 100 is installed with a client, which may be a browser or a third-party application, and corresponds to a Server (Server) end.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
First embodiment
Referring to fig. 3, fig. 3 is a flowchart of a page processing method according to a first embodiment of the invention. The method is applied to a client, wherein the method is applied to a client provided in a client terminal 100. The flow shown in fig. 3 will be described in detail below, and the method includes:
step S110: the client side obtains a page cache strategy control head part of a main document returned by the server, wherein the page cache strategy control head part carries a cache strategy of the main document.
In the present embodiment, the main document may be a document describing a body frame of a web page, for example, an HTML document. The body frame of the web page may be the resources included in the web page and corresponding attributes, such as the location where the resources are stored, the height and width of the display area, layout information, and the like.
The client may initiate a main document request to the server, and the server may generate a response based on the control information acquired in advance after receiving the request. The response comprises a page cache policy control head and a response body, and after receiving the response, the client can analyze the response and cache the page cache policy control head and the response body in the local file.
The Page Cache policy Control header (for example, Page-Cache-Control, which may refer to Page Cache policy Control header) carries the Cache policy of the main document, where the header includes Control time and Control content, and may Control resources to execute the Control content in the Control time, for example:
Page-Cache-Control:true,control-time=3600
Cache-Control:max-age=0
Content-Type:text/html;charset=utf-8,
indicating that the primary document cannot be cached within one hour; the responder corresponds to the content of the resource included in the master document.
Step S120: and generating a caching strategy of the sub-resources of the main document based on the caching strategy of the main document.
The sub-resources comprise at least one of CSS resources, JavaScript resources, pictures and other resources contained in the main document.
After receiving the response, the client can analyze the Page-Cache-Control header and generate a sub-resource request carrying the Cache policy of the main document based on the Page-Cache-Control header. Of course, if the client does not find the Page-Cache-Control header or finds the Page-Cache-Control header when analyzing the response, but the value of the header is null or false, the client may directly obtain the child resources according to the original Cache policy of the child resources.
As one approach, the caching policy of the master document may be set in the child resource request when the child resource is requested. In executing the sub-resource request, the client may generate a caching policy for the requested sub-resource based on the caching policy for the main document in the sub-resource request. That is, the caching policy of all the sub-resources under the page of the main document can be controlled by the page caching policy control header of the main document.
Further, when generating the cache policy of the requested sub-resource, the client may update the response header of the sub-resource local cache file to obtain the updated response header of the sub-resource local cache file based on the cache policy of the main document in the sub-resource request, so that the updated response header of the sub-resource local cache file also carries the cache policy of the main document, and then generate the cache policy of the sub-resource based on the updated response header of the sub-resource local cache file.
For example, the response header of the original child resource local cache file is:
Cache-Control:max-age=86400,
the response head of the sub-resource local Cache file updated according to the Cache policy (controlled by the Page Cache policy Control head) of the main document carries the same Control time and Control content as the Page-Cache-Control:
Page-Cache-Control:true,control-time=3600
Cache-Control:max-age=0,
then the caching strategy for generating the child resource according to the response header of the updated child resource local cache file is as follows: within 1 hour (Control-time 3600), the child resources all use Cache-Control: max-age 0, i.e., no local Cache is used.
It can be seen from the above examples that the client updates the response header of the local cache file of the child resource through the page cache policy control header requested by the main document, thereby affecting the cache policy of the child resource and controlling the cache of the child resource through the main document.
It should be noted that the main text is not limited to only html documents, and the sub-resources are not limited to CSS resources, js resources, picture resources, and the like required by html documents. As long as the caching policies of the documents having the above-mentioned affiliations between the main document and the sub-resources can be implemented by the method provided by the present embodiment, that is, all are within the scope of protection of the present embodiment.
Step S130: and acquiring the sub-resources based on the caching strategy of the sub-resources.
After the client generates the caching policy of the sub-resource, the client may omit to acquire the sub-resource according to the caching policy of the sub-resource, for example, the caching policy of the sub-resource shown above is: within 1 hour, the sub-resource does not use the local cache, and the client can request the required sub-resource from the network. If the local cached resource is wrong and the network resource is corrected, the client can request the corrected sub-resource from the network by the method, instead of the sub-resource which is cached locally and has no overdue and has a mistake.
In this embodiment, the request header of the sub-resource of the main document is updated by using the page cache policy control header of the main document request, so that the request header of the sub-resource carries the cache policy of the main document, and then the response header of the local cache file of the sub-resource is updated according to the request header of the sub-resource, so that the response header of the updated local cache file of the sub-resource also carries the cache policy of the main document, thereby generating the cache policy of the sub-resource through the cache policy of the main document, and obtaining the sub-resource according to the cache policy of the sub-resource, so that the updated sub-resource can be obtained instead of the unexpired and non-updated sub-resource cached in the local, and the cache control is more flexible.
Second embodiment
Referring to fig. 4, fig. 4 is a flowchart of a page processing method according to a second embodiment of the present invention, where the method is applied to a client. The flow shown in fig. 4 will be explained, and the method includes:
step S210: the client side obtains a page cache strategy control head part of a main document returned by the server, wherein the page cache strategy control head part carries a cache strategy of the main document.
Step S220: and judging whether the effective child resources exist in the child resource local cache file.
Because the sub-resources in the local cache file have valid periods, when the client initiates a sub-resource request, whether the sub-resources are expired or not can be judged in a sub-resource local cache file module in the client, that is, whether valid sub-resources exist or not can be judged.
Further, the "control-time" in the response header of the original local cache file may be used to determine the time of the cache.
Step S230: and if so, updating the response head of the original local cache file of the child resource into the response head carrying the cache strategy of the main document.
Step S231: otherwise, generating a cache strategy of the child resource based on the response head of the original child resource local cache file, and acquiring the child resource based on the cache strategy of the child resource.
Step S240: and generating a caching strategy of the child resource based on the updated response header.
Step S250: and acquiring the sub-resources based on the caching strategy of the sub-resources.
In this embodiment, the request header of the sub-resource of the main document is updated by using the page cache policy control header of the main document request, so that the request header of the sub-resource carries the cache policy of the main document, after it is determined that an effective sub-resource exists in the local cache file of the sub-resource, the response header of the local cache file of the sub-resource is updated according to the request header of the sub-resource, so that the response header of the updated local cache file of the sub-resource also carries the cache policy of the main document, thereby generating the cache policy of the sub-resource according to the cache policy of the main document, and obtaining the sub-resource according to the cache policy of the sub-resource, so that the updated sub-resource can be obtained instead of the unexpired and un-updated sub-resource cached in the local, and the cache control is more flexible.
Third embodiment
Referring to fig. 5, fig. 5 is a block diagram of a page processing apparatus 400 according to a third embodiment of the present invention, the apparatus is operated in a client terminal, and includes: a first acquisition module 410, a generation module 420, and a second acquisition module 430. The block diagram of the structure shown in fig. 5 will be explained below.
A first obtaining module 410, configured to obtain a page cache policy control header of a main document returned by a server, where the page cache policy control header carries a cache policy of the main document.
A generating module 420, configured to generate a caching policy of the child resource of the main document based on the caching policy of the main document.
A second obtaining module 420, configured to obtain the child resource based on the caching policy of the child resource.
Further, the generating module 420 may include:
the updating submodule 421 is configured to update the response header of the original local cache file of the child resource to a response header carrying the cache policy of the main document;
a generating sub-module 422, configured to generate a caching policy of the sub-resource based on the updated response header.
In this embodiment, please refer to the contents described in the embodiments shown in fig. 1 to fig. 4 for the process of implementing each function of each functional module of the page processing apparatus 400, which is not described herein again.
In this embodiment, the modules may be implemented by software codes, and in this case, the modules may be stored in the memory 110 of the user terminal 100. The above modules may also be implemented by hardware, such as an integrated circuit chip.
Fourth embodiment
Referring to fig. 6, fig. 6 is a block diagram of a page processing apparatus 500 according to a fourth embodiment of the present invention. The block diagram of fig. 6 will be explained, and the apparatus shown comprises: a first acquisition module 510, a generation module 520, and a second acquisition module 530.
A first obtaining module 510, configured to obtain a page cache policy control header of a main document returned by a server, where the page cache policy control header carries a cache policy of the main document.
A generating module 520, configured to generate a caching policy of the child resource of the main document based on the caching policy of the main document.
A second obtaining module 530, configured to obtain the child resource based on the caching policy of the child resource.
Further, the generating module 520 may include:
the updating submodule 521 is configured to update the response header of the original local cache file of the child resource to a response header carrying the cache policy of the main document;
the generating sub-module 522 is configured to generate a caching policy of the sub-resource based on the updated response header.
Still further, the update sub-module 521 may include:
a determining submodule 5211, configured to determine whether a valid child resource exists in the child resource local cache file;
the execution sub-module 5212 is configured to update the response header of the original sub-resource local cache file to the response header carrying the cache policy of the main document when the judgment sub-module judges that the sub-resource local cache file exists, and generate the cache policy of the sub-resource based on the response header of the original sub-resource local cache file when the judgment sub-module judges that the sub-resource local cache file does not exist.
For the process of implementing each function of each functional module of the page processing apparatus 500 in this embodiment, please refer to the content described in the embodiments shown in fig. 1 to fig. 4, which is not described herein again.
In this embodiment, the modules may be implemented by software codes, and in this case, the modules may be stored in the memory 110 of the user terminal 100. The above modules may also be implemented by hardware, such as an integrated circuit chip.
In summary, in the page processing method, the page processing apparatus, the user terminal, and the storage medium provided in the embodiments of the present invention, the request header of the sub-resource of the main document is updated by using the page cache policy control header requested by the main document, so that the request header of the sub-resource carries the cache policy of the main document, and then the response header of the local cache file of the sub-resource is updated according to the request header of the sub-resource, so that the response header of the local cache file of the updated sub-resource also carries the cache policy of the main document, and thus the cache policy of the sub-resource is generated by using the cache policy of the main document, and the sub-resource is obtained according to the cache policy of the sub-resource, and the updated sub-resource can be obtained instead of the unexpired and non-updated sub-resource cached in the local, thereby achieving flexible cache control.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes. It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A page processing method, characterized in that the method comprises:
the method comprises the steps that a client side obtains a page cache strategy control head part of a main document returned by a server, wherein the page cache strategy control head part carries a cache strategy of the main document;
generating a caching strategy of a sub-resource of the main document based on the caching strategy of the main document;
acquiring the sub-resources based on the caching strategy of the sub-resources;
generating a caching policy of a child resource of the main document based on the caching policy of the main document, wherein the generating of the caching policy of the child resource of the main document comprises: updating the response head of the original local cache file of the child resource into the response head of the cache strategy carrying the main document; and generating a caching strategy of the child resource based on the updated response header.
2. The method according to claim 1, wherein the updating the response header of the original child resource local cache file to the response header carrying the cache policy of the primary document comprises:
judging whether the effective child resources exist in the local cache files of the child resources;
when the main document exists, updating the response head of the original sub-resource local cache file into the response head carrying the cache strategy of the main document;
otherwise, generating the caching strategy of the child resources based on the response head of the original child resource local caching file.
3. The method of claim 1, wherein the updated response header includes a control time and a control content, and wherein generating the caching policy for the child resource based on the updated response header comprises:
the client executes the control content within the control time based on the updated response header.
4. The method of claim 1, wherein the sub-resources comprise at least one of CSS resources, JavaScript resources, and picture resources.
5. A page processing apparatus, characterized in that the apparatus comprises:
the first acquisition module is used for acquiring a page cache policy control head of a main document returned by a server, wherein the page cache policy control head carries a cache policy of the main document;
the generation module is used for generating a cache strategy of the sub-resource of the main document based on the cache strategy of the main document;
the second obtaining module is used for obtaining the sub-resources based on the caching strategy of the sub-resources;
wherein the generating module comprises: the updating submodule is used for updating the response head of the original local cache file of the child resource into the response head carrying the cache strategy of the main document; and the generating submodule is used for generating the caching strategy of the sub-resource based on the updated response head.
6. The apparatus of claim 5, wherein the update submodule comprises:
the judgment submodule is used for judging whether the effective sub-resources exist in the local cache file of the sub-resources;
and the execution sub-module is used for updating the response head of the original sub-resource local cache file into the response head carrying the cache strategy of the main document when the judgment sub-module judges that the sub-resource local cache file exists, and generating the cache strategy of the sub-resource based on the response head of the original sub-resource local cache file when the judgment sub-module judges that the sub-resource local cache file does not exist.
7. The apparatus of claim 5, wherein the updated response header comprises a control time and a control content, and wherein the generating module is configured to execute the control content within the control time based on the updated response header.
8. The apparatus of claim 5, wherein the sub-resources comprise at least one of CSS resources, JavaScript resources, and picture resources.
9. A user terminal comprising a processor and a memory coupled to the processor, the memory storing instructions that, when executed by the processor, perform the following:
acquiring a page cache policy control header of a main document returned by a server, wherein the page cache policy control header carries a cache policy of the main document;
generating a caching strategy of a sub-resource of the main document based on the caching strategy of the main document;
acquiring the sub-resources based on the caching strategy of the sub-resources;
generating a caching policy of a child resource of the main document based on the caching policy of the main document, wherein the generating of the caching policy of the child resource of the main document comprises: updating the response head of the original local cache file of the child resource into the response head of the cache strategy carrying the main document; and generating a caching strategy of the child resource based on the updated response header.
10. A computer-readable storage medium having stored thereon program code executable by a processor, the program code configured to cause the processor to perform the method of any of claims 1-4.
CN201710445182.7A 2017-06-13 2017-06-13 Page processing method, device, user terminal and storage medium Active CN108280111B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710445182.7A CN108280111B (en) 2017-06-13 2017-06-13 Page processing method, device, user terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710445182.7A CN108280111B (en) 2017-06-13 2017-06-13 Page processing method, device, user terminal and storage medium

Publications (2)

Publication Number Publication Date
CN108280111A CN108280111A (en) 2018-07-13
CN108280111B true CN108280111B (en) 2020-11-24

Family

ID=62801216

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710445182.7A Active CN108280111B (en) 2017-06-13 2017-06-13 Page processing method, device, user terminal and storage medium

Country Status (1)

Country Link
CN (1) CN108280111B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111191158A (en) * 2019-12-27 2020-05-22 北京达佳互联信息技术有限公司 Webpage resource caching method and device, computer equipment and storage medium
CN117056971B (en) * 2023-08-15 2024-04-30 北京房多多信息技术有限公司 Data storage method, device, electronic equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096712A (en) * 2011-01-28 2011-06-15 深圳市五巨科技有限公司 Method and device for cache-control of mobile terminal
CN104796439A (en) * 2014-01-16 2015-07-22 腾讯科技(深圳)有限公司 Webpage pushing method, webpage pushing client, webpage pushing server and webpage pushing system
CN105279034A (en) * 2015-10-26 2016-01-27 北京皮尔布莱尼软件有限公司 Consistency cache control system and method
CN106534243A (en) * 2015-09-14 2017-03-22 阿里巴巴集团控股有限公司 Caching, requesting and responding method based on HTTP protocol and corresponding device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9819762B2 (en) * 2015-06-26 2017-11-14 Cloudflare, Inc. Method and apparatus for reducing loading time of web pages

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096712A (en) * 2011-01-28 2011-06-15 深圳市五巨科技有限公司 Method and device for cache-control of mobile terminal
CN104796439A (en) * 2014-01-16 2015-07-22 腾讯科技(深圳)有限公司 Webpage pushing method, webpage pushing client, webpage pushing server and webpage pushing system
CN106534243A (en) * 2015-09-14 2017-03-22 阿里巴巴集团控股有限公司 Caching, requesting and responding method based on HTTP protocol and corresponding device
CN105279034A (en) * 2015-10-26 2016-01-27 北京皮尔布莱尼软件有限公司 Consistency cache control system and method

Also Published As

Publication number Publication date
CN108280111A (en) 2018-07-13

Similar Documents

Publication Publication Date Title
US8768881B2 (en) RSS data-processing object
US8307279B1 (en) Smooth zooming in web applications
CN107818008B (en) Page loading method and device
CN103959281A (en) Method for associating third party content with online document signing
US11361149B2 (en) Techniques for web framework detection
US11061934B1 (en) Method and system for characterizing time series
CN113535587B (en) Target application detection method and device and computer equipment
US20120096078A1 (en) Systems and methods for archiving media assets
US9773126B2 (en) Data collection privacy
KR20150110743A (en) Systems and methods to map page states
CN108280111B (en) Page processing method, device, user terminal and storage medium
CN106897202B (en) Method and apparatus for outputting data
CN112395535B (en) Lazy loading method and apparatus for picture, medium and electronic device
CN111783005A (en) Method, apparatus and system for displaying web page, computer system and medium
CN113641924B (en) Webpage interactive time point detection method and device, electronic equipment and storage medium
JP2016045754A (en) Program for warning access to web page, method, and system
CN115037728B (en) Protocol updating method, device, equipment and storage medium
CN116304458A (en) Method, device, equipment and medium for web page real-time notification update
CN107918552B (en) Light application calling method and device, client device and electronic equipment
CN114138886A (en) Document export method, user side and server side
CN108418827B (en) Network behavior analysis method and device
CN115994259A (en) User portrait generation method and device, storage medium and terminal
US11288336B2 (en) Systems and methods for providing content items in situations involving suboptimal network conditions
CN108874390B (en) Data processing method and device, equipment and storage medium
CN113721909A (en) Element scaling monitoring method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200624

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Alibaba (China) Co.,Ltd.

Address before: 510627 Guangdong city of Guangzhou province Whampoa Tianhe District Road No. 163 Xiping Yun Lu Yun Ping B radio square 14 storey tower

Applicant before: GUANGZHOU UCWEB COMPUTER TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant