CN113407876B - Webpage refreshing method, webpage refreshing system and related device - Google Patents

Webpage refreshing method, webpage refreshing system and related device Download PDF

Info

Publication number
CN113407876B
CN113407876B CN202110677984.7A CN202110677984A CN113407876B CN 113407876 B CN113407876 B CN 113407876B CN 202110677984 A CN202110677984 A CN 202110677984A CN 113407876 B CN113407876 B CN 113407876B
Authority
CN
China
Prior art keywords
cache
view
refreshing
level cache
request
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
CN202110677984.7A
Other languages
Chinese (zh)
Other versions
CN113407876A (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.)
DBAPPSecurity Co Ltd
Original Assignee
DBAPPSecurity 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 DBAPPSecurity Co Ltd filed Critical DBAPPSecurity Co Ltd
Priority to CN202110677984.7A priority Critical patent/CN113407876B/en
Publication of CN113407876A publication Critical patent/CN113407876A/en
Application granted granted Critical
Publication of CN113407876B publication Critical patent/CN113407876B/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
    • 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/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/986Document structures and storage, e.g. HTML extensions

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)

Abstract

The application provides a webpage refreshing method, which comprises the following steps: receiving a refreshing request of a webpage; judging whether the browser sets a negotiation cache or not; if yes, judging whether the refreshing request hits a view level cache or not; the view level cache is at least three levels; and if the refreshing request contains the view level cache, returning the view level cache corresponding to the refreshing request so that the browser can refresh the webpage by using the view level cache. According to the method and the device, when the webpage refreshing is executed, whether the browser sets the negotiation cache or not is judged firstly, when the browser sets the negotiation cache, the server side can return the view level cache corresponding to the refreshing request without returning all data of the webpage, transmission of repeated level flow is saved, the browser cache is fully utilized, the page can be generated quickly, the webpage loading time is shortened, and the comfort of user webpage browsing is enhanced. The application also provides a webpage refreshing system, a computer readable storage medium and a server, which have the beneficial effects.

Description

Webpage refreshing method, webpage refreshing system and related device
Technical Field
The present application relates to the field of computer networks, and in particular, to a web page refreshing method, a web page refreshing system, and a related device.
Background
At present, most of pages pay attention to the loading speed of a first screen, most of applications have relatively complex first screens and frequent detail change, but part of pages cannot be changed, most data codes are repeated once all data of the pages are requested, and the page loading speed is seriously influenced by re-rendering after the codes returned by a server are received.
Disclosure of Invention
The application aims to provide a webpage refreshing method, a webpage refreshing system, a computer readable storage medium and a server, and the webpage loading speed is effectively improved by setting view level cache.
In order to solve the technical problem, the application provides a webpage refreshing method, which specifically adopts the following technical scheme:
receiving a refreshing request of a webpage;
judging whether the browser sets a negotiation cache or not;
if yes, judging whether the refreshing request hits view level cache or not; the view level cache is at least three layers;
and if the refreshing request contains the view level cache, returning the view level cache corresponding to the refreshing request so that the browser can refresh the webpage by using the view level cache.
Optionally, before determining whether the browser sets the negotiation cache, the method further includes:
judging whether the browser sets a forced cache or not;
if not, executing a step of judging whether the browser sets a negotiation cache;
if yes, judging whether the forced cache is overdue or not;
if the forced cache is overdue, executing a step of judging whether the browser sets a negotiation cache;
and if the forced cache is not expired, refreshing the webpage by utilizing the forced cache.
Optionally, returning the view level cache corresponding to the refresh request includes:
analyzing request header data contained in the refreshing request to obtain a cache identifier corresponding to the view level;
and returning the view level cache corresponding to the cache identification.
Optionally, if the request header data includes a browser-side view timestamp, returning to the view-level cache corresponding to the cache identifier includes:
determining a latest view timestamp;
judging whether the browser-side view timestamp is consistent with the latest view timestamp;
and if the view data are inconsistent with the request header data, caching the latest view timestamp and the corresponding level cache code as the view level cache corresponding to the request header data, storing the view level cache into response header data, and returning the response header data.
Optionally, if the refresh request does not include a view level cache, the method further includes:
and returning all the page source data so that the browser can render the page source data and refresh the webpage.
Optionally, the method further includes:
and determining a target element, adding a preset identifier to the target element, and generating the view level cache.
Optionally, the method further includes:
and configuring a corresponding unique identifier according to the directory structure of the webpage to generate the view level cache.
The present application further provides a web page refreshing system, including:
the request receiving module is used for receiving a refreshing request of a webpage;
the first judgment module is used for judging whether the browser sets a negotiation cache;
the second judging module is used for judging whether the refreshing request hits the view level cache or not when the judging result of the first judging module is yes; the view level cache is at least three levels;
and the webpage refreshing module is used for returning the view level cache corresponding to the refreshing request when the judgment result of the second judgment module is yes, so that the browser can refresh the webpage by using the view level cache.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method as set forth above.
The present application further provides a server comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method as described above when calling the computer program in the memory.
The application provides a webpage refreshing method, which comprises the following steps: receiving a refreshing request of a webpage; judging whether the browser sets a negotiation cache or not; if yes, judging whether the refreshing request hits a view level cache or not; the view level cache is at least three levels; and if the refreshing request comprises the view level cache, returning the view level cache corresponding to the refreshing request so that the browser can refresh the webpage by using the view level cache.
According to the method and the device, when the webpage refreshing is executed, whether the browser sets the negotiation cache or not is judged firstly, when the browser sets the negotiation cache, the server side can return the view level cache corresponding to the refreshing request without returning all data of the webpage, transmission of repeated level flow is saved, the browser cache is fully utilized, the page can be generated quickly, the webpage loading time is shortened, and the comfort of user webpage browsing is enhanced.
The application further provides a webpage refreshing system, a computer readable storage medium and a server, which have the beneficial effects, and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a web page refreshing method according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a web page refreshing system according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
Referring to fig. 1, fig. 1 is a flowchart of a web page refreshing method according to an embodiment of the present application, where the method includes:
s101: receiving a refreshing request of a webpage;
the step aims to receive a refresh request of a webpage, wherein the refresh request can be an active request or a passive refresh request generated according to preset refresh parameters. For example, a user may be an actively generated refresh request when opening a web page at a home page. The web page in this step may be originated from various terminal devices capable of running web pages, and it should be noted that the web page may be a mobile terminal web page, for example, an application interface on a mobile terminal, which may be used as the web page in this embodiment.
The specific content of the refresh request is not limited herein, and at least should include the cache request, but the specific content of the cache request is not specifically limited.
S102: judging whether the browser sets a negotiation cache; if yes, entering S103;
this step is intended to determine whether the browser has setup a negotiation cache. And the negotiation cache is used for carrying out negotiation interaction between the client side containing the browser and the server side so as to judge whether the cache resources are overdue or not. When the resource is requested, the local cache identifier of the browser is brought to the server side at the same time, and the server side compares the latest resource. If the cache resources are not changed, the browser reads the local cache. And if the cache resources are changed, returning the latest resources.
S103: judging whether the refreshing request hits a view level cache or not; if yes, entering S104;
when the browser sets the negotiation cache, the comparison process of the local resource and the latest resource is not directly executed at the server, but whether the refresh request contains the view level cache is judged. In this embodiment, if the refresh request includes a view level cache, it is default that view layering is performed on the web pages in the browser before the embodiment is executed. There is no limitation on how the web page view layering is performed. The present embodiment provides the following web view layering methods:
the first method comprises the following steps: and determining a target element, adding a preset identifier to the target element, and generating the view level cache.
Namely, a user can customize a target element as a layer of view, and add a corresponding preset identifier to obtain a view level cache of the target element, which is equivalent to separate classification of the target element from local webpage resources, and corresponding view layering is performed in a server. For example, a certain div may be given a corresponding view level, with the attribute denoted by s-index.
And the second method comprises the following steps: and configuring a corresponding unique identifier according to the directory structure of the webpage to generate the view level cache.
The view layering can also be performed according to the directory structure of the web page, for example, the html element of the root node is a first layer, the body and body same level is a second layer, the next layer of the body is a third layer, and so on. Of course, each level contains a corresponding unique identification.
And the third is that: and carrying out first-class view layering according to the directory structure of the webpage, and configuring a custom hierarchy item on the basis of the first-class view layering.
That is, the first and second view layering methods are combined, and preferably, the first mode and the second mode can be combined and divided into two modes in the practical application process of view layering. The first is the default mode, where each level in the default mode is automatically labeled with a unique v-index, with reference to the level of the directory tree of web page elements. The second mode can manually set a v-index for the element, the element with the v-index can cache the corresponding unique identifier, two hierarchical modes can coexist, in order to make view layering convenient, a default mode can be set to be started by default, and the manual mode can be set freely.
Whatever view layering approach is used, it should be at least less than three layers, but not too many, and generally may not exceed 10 layers. Each view level should have a unique corresponding identifier, and the adopted view level should be generated in a manner of being configured with a server side protocol, so that the server side can return to the corresponding view level cache when receiving a refresh request hitting the view level cache.
In addition, the determination of whether the refresh request hits in the view level cache in this step refers to determining whether the refresh request includes a request for the view level cache, or other types of requests having the same effect as the view level cache request, such as a request including a unique identifier of a corresponding view level.
S104: and returning the view level cache corresponding to the refreshing request so that the browser can refresh the webpage by using the view level cache.
When a view-level cache is hit in a refresh request, the corresponding view-level cache is returned. Specifically, request header data included in the refresh request may be analyzed to obtain a cache identifier corresponding to the view level, that is, the view level cache corresponding to the cache identifier may be returned.
It should be noted that how to return the view-level cache corresponding to the refresh request is not limited, and it should respond to different refresh requests.
For example, if the request header data includes a browser-end view timestamp, the following steps may be included when executing the view-level cache corresponding to the cache identifier:
firstly, determining a latest view time stamp;
secondly, judging whether the browser end view timestamp is consistent with the latest view timestamp; if not, entering into the third step;
and thirdly, taking the latest view timestamp and the corresponding level cache code as the view level cache corresponding to the request header data, storing the view level cache into response header data, and returning the response header data.
The server determines the latest view timestamp of the server and judges whether the browser view timestamp in the request header data is consistent with the latest view timestamp of the server, and since the latest view timestamp in the server is the current latest version, once the latest view timestamp in the server is inconsistent with the current latest version, the latest view timestamp in the server lags behind the latest view timestamp in the server. It should be noted that, both the browser-side view timestamp and the service-side view timestamp refer to the latest version time of the corresponding cache, that is, the browser-side view timestamp refers to the last update time of the current version cached in the browser, and the service-side latest view timestamp refers to the last update time of the current version cached by the service-side.
And when the view timestamp and the corresponding hierarchy cache code are inconsistent, the server stores the latest view timestamp and the corresponding hierarchy cache code into response header data and returns the latest view timestamp and the corresponding hierarchy cache code. It is easy to understand that, after receiving the response header data, the browser side refreshes the page by using the hierarchical cache code corresponding to the latest view timestamp, and may also update its own browser side view timestamp to the latest view timestamp.
In the above process, both the view timestamp of the browser end and the view timestamp of the server end play a role of a cache identifier, that is, a cache identifier corresponding to the view level cache, and of course, a person skilled in the art may also adopt other forms of cache identifiers on the basis of this embodiment to implement a comparison process when the view level cache between the browser end and the server end is updated, which is not limited herein by way of example, and which should also be within the scope of the present application.
In addition, in this embodiment, if the refresh request does not include the view level cache, all the page source data may be returned at this time, so that the browser renders the page source data and refreshes the web page.
It should be noted that the server in this embodiment includes a server and other server devices that can receive a refresh request from the browser and respond to the refresh request.
According to the embodiment of the application, when the webpage refreshing is executed, whether the browser is set with the negotiation cache is judged firstly, when the browser is set with the negotiation cache, the server side can return the view level cache corresponding to the refreshing request without returning all data of the webpage, the targeted refreshing during the webpage refreshing is realized, the transmission of repeated level flow is saved, the browser cache is fully utilized, the webpage can be generated quickly, the webpage loading time is shortened, and the comfort of user webpage browsing is enhanced.
Based on the foregoing embodiment, as a preferred embodiment, before determining whether the browser sets the negotiation cache, the method may further include the following steps:
s201: judging whether the browser sets a forced cache or not; if not, entering S202; if yes, entering S203;
s202: executing the step of judging whether the browser sets the negotiation cache;
s203: judging whether the forced cache is expired; if not, entering S204; if yes, returning to S202;
s204: and refreshing the webpage by utilizing the forced cache.
The present embodiment is directed to performing a forced cache determination before performing a negotiation cache. Before initiating a request resource, the browser may first determine whether to hit the forced cache according to the request header fields Expires and the cache-control, and if so, directly read the local cache resource, and no longer send a request to the server, and return a corresponding status code, for example, the status code may be 200. When a browser requests a certain file, the server performs cache configuration on the file in response header data. The caching time and the caching type are controlled by the server, and the caching method is specifically represented as follows: a common setting for cache-control in response to header data is max-image public private no-cache no-store, etc. In short, the forced cache sets an expiration time, and the client will see whether the resource is expired or not every time the client requests the resource, and will send the request to the server again only when the resource is expired.
If the forced cache is not hit, the browser initiates a request with some request header fields, and the server judges whether the negotiated cache is hit or not according to the fields. E.g., if-none-match and if-modified-nonce, which are request header fields that the browser sends to the server. The if-none-match value contains the Etag value in the response header field of the resource returned by the last request server, the Etag value is the unique identifier generated by the server according to the resource file, and the Etag value is unchanged as long as the resource file is unchanged.
And if-modified-sequence is to a last-modified value for indicating last time of return of the service end, the last-modified includes a date of last modification of the response resource at the service end, and the if-modified-sequence recorded by the browser end corresponds to the browser end view timestamp in the above embodiment. Then the server side judges if the if-none-match of the request field and the Etag value produced according to the resource file requested by the server side are the same or not, and judges if the unique identification is the same or not. Or judging if-modified-sequence of the request field and the last modification time of the resource of the server side, namely the latest view time stamp in the server side to compare. If the same indicates that the resource is not changed, the resource file is not returned, which indicates that the negotiation cache is available, and at this time, the code corresponding to the negotiation cache may be returned, for example, return 304, which is used to notify the browser end to directly read the local cache resource. If the difference indicates that the server resource is changed, the requested resource file is returned, and a corresponding status code, for example 200, can also be returned.
When step S202 of the present embodiment is executed, reference may be made to the processes of S102 to S104 in the above-described embodiments, and a description thereof will not be repeated.
The following describes a specific parameter setting process for view level cache and corresponding configuration of a service end:
the view level may adopt a key value pair in a specific storage manner at the request header, specifically, the key uses v-index, the value uses an object to store, and the stored content is a timestamp or a unique identifier of the current view update. If the corresponding html code segment is updated, difference comparison is carried out when the corresponding html code segment is issued, the corresponding v-index timestamp is updated, when the browser sends a refreshing request, the hierarchy mark returned by the server side is brought, the server side compares the latest hierarchy mark with the mark in the browser refreshing request, if the latest hierarchy mark is consistent with the mark in the browser refreshing request, the html code segment is not returned, if the latest hierarchy mark is inconsistent with the mark in the browser refreshing request, the updated html code segment corresponding to the v-index is returned, the browser receives the corresponding code segment, refreshing of the webpage is carried out, and due to the fact that only part of the html code needs to be re-rendered during refreshing, the webpage refreshing speed can be improved.
The server may set a response header to configure whether to use a view level mode, for example, a field is view-store, and a corresponding value is, none, which indicates that a view level is not used; auto, auto mode with level 3, level being hierarchical mode. When level is set, a level can be set for a specific html internal tag, the specific setting is as follows, for example, < html v-index = "4" > level cache tag </html >, after the setting is performed, the server can judge that there are several levels of the v-index set on the tag html, then, for the several levels, each level is set with a v-index-data of a specific cache identifier, and when the browser requests again, the cache identifiers are compared, and nodes with different cache identifiers are returned. The embodiment also plays a role in js and css codes, and can effectively reduce the transmission of redundant codes so as to achieve the purpose of quickly transmitting the codes, thereby being beneficial to quickly refreshing the pages.
The view level storage manner and the configuration parameters of the server side provided in this embodiment are a more specific implementation process disclosed in this application, and those skilled in the art may adopt other setting manners based on this embodiment and shall also fall within the protection scope of this application.
In the following, the web page refreshing system provided by the embodiment of the present application is introduced, and the web page refreshing system described below and the web page refreshing method described above may be referred to correspondingly.
Fig. 2 is a schematic structural diagram of a web page refreshing system provided in an embodiment of the present application, and the present application further provides a web page refreshing system, including:
a request receiving module 100, configured to receive a refresh request of a web page;
a first judging module 200, configured to judge whether the browser sets a negotiation cache;
a second determining module 300, configured to determine whether the refresh request hits in the view level cache when the first determining module 200 determines that the result is yes; the view level cache is at least three levels;
and a web page refreshing module 400, configured to, if the determination result of the second determining module 300 is yes, return to the view level cache corresponding to the refresh request, so that the browser refreshes a web page by using the view level cache.
Based on the above embodiment, as a preferred embodiment, the method further includes:
the system comprises a forced cache judging module, a negotiation cache judging module and a negotiation cache judging module, wherein the forced cache judging module is used for judging whether the browser sets the forced cache or not before judging whether the browser sets the negotiation cache or not; if not, entering a first judgment module 200; if yes, judging whether the forced cache is overdue or not; if the forced cache is expired, entering a first judgment module 200; and if the forced cache is not expired, refreshing the webpage by utilizing the forced cache.
Based on the above embodiment, as a preferred embodiment, the web page refreshing module 400 includes:
the analysis unit is used for analyzing the request header data contained in the refreshing request to obtain a cache identifier corresponding to the view level;
and the return unit is used for returning the view level cache corresponding to the cache identification.
Based on the foregoing embodiment, as a preferred embodiment, if the request header data includes a browser-end view timestamp, the webpage refreshing module 400 includes:
a response data returning unit for determining a latest view timestamp; judging whether the browser-side view timestamp is consistent with the latest view timestamp; and if the view data are inconsistent with the request header data, caching the latest view timestamp and the corresponding level cache code as the view level cache corresponding to the request header data, storing the view level cache into response header data, and returning the response header data.
Based on the above embodiment, as a preferred embodiment, the method further includes:
and the refreshing module is used for returning all the page source data if the refreshing request does not contain the view level cache so that the browser can render the page source data and refresh the webpage.
Based on the above embodiment, as a preferred embodiment, the method further includes:
the first view level generation module is used for determining a target element, adding a preset identifier to the target element and generating the view level cache.
Based on the above embodiment, as a preferred embodiment, the method further includes:
and the second view level generation module is used for configuring a corresponding unique identifier according to the directory structure of the webpage and generating the view level cache.
The present application further provides a computer-readable storage medium, on which a computer program is stored, which, when executed, can implement the steps provided by the above-mentioned embodiments. The storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The application also provides a server, which may include a memory and a processor, where the memory stores a computer program, and the processor may implement the steps provided by the foregoing embodiments when calling the computer program in the memory. Of course, the server may also include various network interfaces, power supplies, and the like.
The embodiments are described in a progressive mode in the specification, the emphasis of each embodiment is on the difference from the other embodiments, and the same and similar parts among the embodiments can be referred to each other. For the system provided by the embodiment, the description is relatively simple because the system corresponds to the method provided by the embodiment, and the relevant points can be referred to the description of the method part.
The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It should also be noted that, in this specification, relational terms such as first and second, and the like are 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 phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.

Claims (8)

1. A webpage refreshing method is characterized by comprising the following steps:
receiving a refreshing request of a webpage;
judging whether the browser sets a negotiation cache or not;
if yes, judging whether the refreshing request hits a view level cache or not; the view level cache is at least three layers;
if the refreshing request contains a view level cache, returning to the view level cache corresponding to the refreshing request so that the browser can refresh the webpage by using the view level cache;
the returning of the view level cache corresponding to the refresh request comprises:
analyzing request header data contained in the refreshing request to obtain a cache identifier corresponding to the view level;
returning the view level cache corresponding to the cache identification;
if the request header data contains a browser-side view timestamp, returning a view level cache corresponding to the cache identifier, including: determining a latest view timestamp;
judging whether the browser-side view timestamp is consistent with the latest view timestamp;
and if the current view timestamp is inconsistent with the current view timestamp, taking the latest view timestamp and the corresponding level cache code as the view level cache corresponding to the request header data, storing the view level cache into response header data, and returning the response header data.
2. The method for refreshing a web page according to claim 1, wherein before determining whether the browser sets the negotiation cache, the method further comprises:
judging whether the browser sets a forced cache or not;
if not, executing a step of judging whether the browser sets a negotiation cache or not;
if yes, judging whether the forced cache is overdue or not;
if the forced cache is overdue, executing a step of judging whether the browser sets a negotiation cache;
and if the forced cache is not expired, refreshing the webpage by utilizing the forced cache.
3. The method for refreshing web pages according to claim 1, wherein if the refresh request does not include a view level cache, further comprising:
and returning all the page source data so that the browser can render the page source data and refresh the webpage.
4. The web page refreshing method according to any one of claims 1 to 3, further comprising:
and determining a target element, adding a preset identifier to the target element, and generating the view level cache.
5. The web page refreshing method according to any one of claims 1 to 3, further comprising:
and configuring a corresponding unique identifier according to the directory structure of the webpage to generate the view level cache.
6. A web page refresh system, comprising:
the request receiving module is used for receiving a refreshing request of a webpage;
the first judgment module is used for judging whether the browser sets a negotiation cache;
the second judging module is used for judging whether the refreshing request hits the view level cache or not when the judging result of the first judging module is yes; the view level cache is at least three layers;
the webpage refreshing module is used for returning to the view level cache corresponding to the refreshing request when the judgment result of the second judgment module is yes, so that the browser can refresh the webpage by using the view level cache;
the returning of the view level cache corresponding to the refresh request comprises:
analyzing request header data contained in the refreshing request to obtain a cache identifier corresponding to the view level;
returning the view level cache corresponding to the cache identification;
if the request header data contains a browser-side view timestamp, returning a view level cache corresponding to the cache identifier, including: determining a latest view timestamp;
judging whether the browser-side view timestamp is consistent with the latest view timestamp;
and if the current view timestamp is inconsistent with the current view timestamp, taking the latest view timestamp and the corresponding level cache code as the view level cache corresponding to the request header data, storing the view level cache into response header data, and returning the response header data.
7. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the web page refreshing method according to any one of claims 1 to 5.
8. A server, characterized in that it comprises a memory in which a computer program is stored and a processor which, when it calls the computer program in the memory, implements the steps of the web page refresh method according to any one of claims 1 to 5.
CN202110677984.7A 2021-06-18 2021-06-18 Webpage refreshing method, webpage refreshing system and related device Active CN113407876B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110677984.7A CN113407876B (en) 2021-06-18 2021-06-18 Webpage refreshing method, webpage refreshing system and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110677984.7A CN113407876B (en) 2021-06-18 2021-06-18 Webpage refreshing method, webpage refreshing system and related device

Publications (2)

Publication Number Publication Date
CN113407876A CN113407876A (en) 2021-09-17
CN113407876B true CN113407876B (en) 2022-10-25

Family

ID=77681382

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110677984.7A Active CN113407876B (en) 2021-06-18 2021-06-18 Webpage refreshing method, webpage refreshing system and related device

Country Status (1)

Country Link
CN (1) CN113407876B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11438433B1 (en) 2021-11-04 2022-09-06 Disney Enterprises, Inc. Progressive object refreshes in content delivery networks

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008047053A1 (en) * 2006-10-19 2008-04-24 France Telecom Content refreshing method and related cache, terminal, servers and computer software
CN109634598B (en) * 2018-12-14 2020-09-18 北京字节跳动网络技术有限公司 Page display method, device, equipment and storage medium
CN111475180A (en) * 2019-01-24 2020-07-31 北京京东尚科信息技术有限公司 Method and system for updating client cache
CN110825479A (en) * 2019-11-05 2020-02-21 江苏满运软件科技有限公司 Page processing method and device, terminal equipment, server and storage medium
CN111273985A (en) * 2020-01-20 2020-06-12 北京无限光场科技有限公司 Page rendering method and device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN113407876A (en) 2021-09-17

Similar Documents

Publication Publication Date Title
TWI614630B (en) Client application login method and its corresponding server
US20100088612A1 (en) Method and System for Displaying Web Page
JP3967806B2 (en) Computerized method and resource nomination mechanism for nominating a resource location
CN106534243B (en) Caching, requesting and responding method based on HTTP protocol and corresponding device
CN105095226B (en) Web page resources loading method and device
US7900147B2 (en) System and method for enabling disconnected web access
EP2593882B1 (en) Method and apparatus of processing nested fragment caching of a web page
WO2016026384A1 (en) Client page display method, device and system
US20060095676A1 (en) Method, system, and computer program product for caching web content
CN107154963B (en) Request processing method and device and electronic equipment
KR20190044134A (en) Website access method, apparatus, and website system
CN101763357A (en) Method and system for browser to load internet resources
JP2008537241A (en) Method for optimizing the management of server caches viewed by client terminals with different characteristics
JP2004280828A5 (en)
WO2014134934A1 (en) Method and system for displaying customized webpage on double webview
CN112100541B (en) Method and device for loading website page element, electronic device and storage medium
US20080104255A1 (en) Sharing state information between dynamic web page generators
WO2014161261A1 (en) Data storage method and apparatus
CN109634753B (en) Data processing method, device, terminal and storage medium for switching browser kernels
CN113407876B (en) Webpage refreshing method, webpage refreshing system and related device
CN108170745B (en) Method and terminal for accessing cache data of web terminal
WO2020088170A1 (en) Domain name system configuration method and related apparatus
US7539776B1 (en) Dynamic uniform resource locator compression
CN109471989A (en) A kind of page request processing method and relevant apparatus
CN113918857A (en) Three-level cache acceleration method for improving performance of distributed WEB application system

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
GR01 Patent grant
GR01 Patent grant