CN110795650A - Webpage opening method and device and computer readable storage medium - Google Patents

Webpage opening method and device and computer readable storage medium Download PDF

Info

Publication number
CN110795650A
CN110795650A CN201910884361.XA CN201910884361A CN110795650A CN 110795650 A CN110795650 A CN 110795650A CN 201910884361 A CN201910884361 A CN 201910884361A CN 110795650 A CN110795650 A CN 110795650A
Authority
CN
China
Prior art keywords
webpage
uniform resource
resource locator
web page
data
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.)
Pending
Application number
CN201910884361.XA
Other languages
Chinese (zh)
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.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank 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 Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN201910884361.XA priority Critical patent/CN110795650A/en
Publication of CN110795650A publication Critical patent/CN110795650A/en
Pending legal-status Critical Current

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

Abstract

The invention discloses a webpage opening method, which comprises the following steps: when a webpage activation request is received, acquiring a uniform resource locator in the webpage activation request; judging whether cached webpage data corresponding to the uniform resource locator are stored locally or not according to the uniform resource locator; and if the cached webpage data corresponding to the uniform resource locator are locally stored, loading the cached webpage data so as to locally open the target webpage corresponding to the webpage activation request. The invention also provides a webpage opening device and a computer readable storage medium. According to the invention, the cache data of the webpage are downloaded and stored locally, so that the corresponding cache webpage data stored locally can be directly loaded when the webpage is accessed subsequently, and the webpage is loaded off-line, thereby saving the access time and shortening the white screen response time. In addition, when webpage data are loaded, the construction of the webpage and the rendering of the webpage are synchronously carried out, so that the white screen response time is further shortened.

Description

Webpage opening method and device and computer readable storage medium
Technical Field
The present invention relates to the field of network technologies, and in particular, to a method and an apparatus for opening a web page, and a computer-readable storage medium.
Background
An HTTP (hypertext Transfer protocol) request refers to a web page request from a client to a server, and generally includes a Uniform Resource Locator (URL), which is a concise representation of a location and an access method of a Resource available from the internet and is an address of a standard Resource on the internet. Each file on the internet has a unique URL that contains information indicating the location of the file and how the browser should handle it.
In the prior art, a web page is opened from a client by inputting a website or clicking web page content on a web application program of the client to initiate an HTTP request, the client receives the HTTP request and sends the HTTP request to a server, the server sends a corresponding file to the client according to a URL in the HTTP request, and the client loads the file, thereby opening the web page.
The existing webpage opening mode has the defects that: the resources are required to be acquired from the client, then the page of the webpage is built, and finally the webpage is rendered, so that the complete webpage can be presented to the user finally, the whole processing process is long, the white screen response time is long, and the user experience is influenced.
Disclosure of Invention
The invention provides a webpage opening method, a webpage opening device and a computer readable storage medium, and aims to solve the technical problem that the existing webpage opening mode has long white screen response time.
In order to achieve the above object, the present invention provides a method for opening a web page, comprising the steps of:
when a webpage activation request is received, acquiring a uniform resource locator in the webpage activation request;
judging whether cached webpage data corresponding to the uniform resource locator are stored locally or not according to the uniform resource locator;
and if the cached webpage data corresponding to the uniform resource locator are locally stored, loading the cached webpage data so as to locally open the target webpage corresponding to the webpage activation request.
Optionally, after the step of determining whether cached webpage data corresponding to the uniform resource locator is stored locally, the method further includes:
and if the cached webpage data corresponding to the uniform resource locator are not stored locally, sending the webpage activation request to a server so as to load the corresponding webpage data from the server and open the target webpage online.
Optionally, the step of loading the web page data from the server or from the server includes:
and constructing a page of the webpage according to the webpage data, and synchronously rendering page elements in the webpage data into the constructed page.
Optionally, the step of determining whether cached webpage data corresponding to the uniform resource locator is stored locally according to the uniform resource locator includes:
modifying the uniform resource locator into a local storage path according to a preset rule;
judging whether available cached webpage data are stored under the local storage path;
if the cached webpage data corresponding to the uniform resource locator is locally stored, the step of loading the cached webpage data to locally open the target webpage corresponding to the webpage activation request includes:
if the available cache webpage data are stored in the local storage path, loading the cache webpage data to locally open a target webpage corresponding to the webpage activation request
If the cached webpage data corresponding to the uniform resource locator are not stored locally, the webpage activation request is sent to a server, and the step of loading the corresponding webpage data from the server to open the target webpage from the online comprises the following steps:
and if the available cached webpage data are not stored in the local storage path, sending the webpage activation request to a server, and loading corresponding webpage data from the server to open the target webpage online.
Optionally, before the step of modifying the uniform resource locator to the local storage path according to a preset rule, the method further includes:
judging whether the uniform resource locator is located in a preset white list, wherein the preset white list is prestored with uniform resource locators corresponding to all webpages capable of being loaded offline;
if the uniform resource locator is located in a preset white list, executing a step of modifying the uniform resource locator into a local storage path according to a preset rule;
and if the uniform resource locator is not located in a preset white list, executing the step of sending the webpage activation request to a server.
Optionally, after the step of sending the web page activation request to a server, the method further includes:
and downloading the webpage data corresponding to the uniform resource locator from the server, and packaging and storing the webpage data in the local.
Optionally, the preset rule is: removing a protocol field of the uniform resource locator header and a delimiter following the protocol field.
Optionally, the server is automatically accessed at preset time intervals to update the cached webpage data.
In addition, to achieve the above object, the present invention further provides a web page opening apparatus, including a memory and a processor, where the memory stores a web page opening program executable on the processor, and the web page opening program, when executed by the processor, implements the following steps:
when a webpage activation request is received, acquiring a uniform resource locator in the webpage activation request;
judging whether cache webpage data corresponding to the uniform resource locator are stored locally or not according to the uniform resource locator;
and if the cached webpage data corresponding to the uniform resource locator are locally stored, loading the cached webpage data so as to locally open the target webpage corresponding to the webpage activation request.
In addition, to achieve the above object, the present invention also provides a computer readable storage medium, which stores a web page opening program, where the web page opening program is executable by one or more processors to implement the steps of the web page opening method as described above.
According to the webpage opening method, the webpage opening device and the computer readable storage medium, the cache data (such as the offline plug-in) of the webpage are downloaded and stored locally, so that the corresponding cache webpage data stored locally can be directly loaded when the webpage is accessed subsequently, the webpage is loaded offline, the access time is saved, and the white screen response time is shortened. In addition, in the process of loading the webpage data, the webpage for constructing the webpage and the webpage rendering are synchronously carried out, namely, corresponding page elements are rendered into the constructed webpage while the webpage of the webpage is constructed, so that the white screen response time is further shortened.
Drawings
Fig. 1 is a schematic flowchart of a method for opening a web page according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating an internal structure of a web page opening device according to an embodiment of the present invention;
fig. 3 is a schematic block diagram of a web page opening program in the web page opening device according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a webpage opening method. Fig. 1 is a schematic flow chart illustrating a method for opening a web page according to an embodiment of the present invention. The method may be performed by an apparatus, which may be implemented by software and/or hardware.
In this embodiment, the method for opening a web page includes:
step S10, when receiving the web page activation request, obtaining the uniform resource locator in the web page activation request.
It will be appreciated that when a user enters a web address or clicks on web page content (e.g., clicks back to the home page) on the client's web application, an HTTP request (i.e., a web page activation request) will be initiated, which will include the uniform resource locator URL of the user requesting to open the web page, for example:
when the webpage opened by the user request is: HTTP:// b. pingan. com. cn/creatcard/index. html, then HTTP:// b. pingan. com. cn/creatcard/index. html is the URL in the HTTP request.
The client includes but is not limited to a mobile phone, a tablet, a computer, an intelligent wearable device, an intelligent television, and the like, and the network application may be an APP program loaded on the client, and may be, for example but not limited to, WeChat, QQ, Baidu, UC, and the like.
Step S20, determining whether cached webpage data corresponding to the uniform resource locator is stored locally according to the uniform resource locator.
When the cached web page data corresponding to the uniform resource locator is locally stored, step S30 is executed to load the web page locally, and when the cached web page data corresponding to the uniform resource locator is not locally stored, step S40 is executed to load the web page online.
It should be noted that the cached web page data is offline cached data of a web page downloaded from a service and stored in a local storage medium, and the cached data is preferably stored in the storage medium in a data packet manner. The cache webpage data can be downloaded in an importing mode, and data such as an offline plug-in of the webpage and the like can be downloaded to the local when the webpage is accessed for the first time.
In specific implementation, the locally stored cached webpage data may use a corresponding uniform resource locator as an identifier, and the identifier may be: named in uniform resource locators, or as collateral information, or as storage paths, etc. For example, at least one item of naming, attribute information, and storage path of the cached web page data of the a web page contains part or all of the content of the uniform resource locator of the a web page. Based on the above identifier, in this step S20, it can be determined whether cached webpage data corresponding to the uniform resource locator is stored locally according to the uniform resource locator.
And step S30, loading the cached webpage data to locally open the target webpage corresponding to the webpage activation request.
The loading of the cached webpage data refers to the whole process of constructing and rendering a page according to the cached webpage data.
Step S40, sending the web page activation request to the server, so as to load the corresponding web page data from the server, and open the target web page corresponding to the web page activation request from the online.
It can be understood that the specific process of this step is that the client first sends an HTTP request to the server, then stays in a state of waiting for the server to feed back data, the server finds corresponding web page data from a corresponding storage path according to a uniform resource locator URL in the HTTP request and sends the web page data to the client, and the client finally loads the received web page data to open a web page from online.
According to the webpage opening method provided by the embodiment, the cache data (such as the offline plug-in) of the webpage are downloaded and stored locally, so that the corresponding cache webpage data stored locally can be directly loaded when the webpage is accessed subsequently, the webpage is loaded offline, the access time is saved, and the white screen response time is shortened. Meanwhile, the webpage opening method also realizes free switching of online and offline access of the webpage.
Further, in another embodiment of the method of the present invention, the step of loading the web page data from the server or from the server comprises:
and constructing a page of the webpage according to the webpage data, and synchronously rendering page elements in the webpage data into the constructed page.
Wherein the page elements include, but are not limited to, text, font color, font size, picture, and the like. The page for constructing the webpage refers to a page frame for constructing the webpage.
In the webpage opening method in the embodiment, no matter the webpage data is loaded from the local or the online, the page construction and the page rendering are performed synchronously in the loading process, namely, the page elements are rendered into the corresponding container in advance in the page construction stage, instead of rendering the page after the page construction is finished, so that the content can be displayed when the page is loaded, and the white screen time is further shortened.
In order to implement synchronous operation of page construction and page rendering, the processor running the webpage opening method in the embodiment can be a multi-core processor, so that the page construction and the page rendering are ensured not to interfere with each other, and the synchronization is ensured.
Further, in another embodiment of the method of the present invention, the step of determining whether cached webpage data corresponding to the uniform resource locator is stored locally according to the uniform resource locator includes:
modifying the uniform resource locator into a local storage path according to a preset rule;
judging whether available cached webpage data are stored under the local storage path;
if the cached webpage data corresponding to the uniform resource locator is locally stored, the step of loading the cached webpage data to locally open the target webpage corresponding to the webpage activation request includes:
if the available cache webpage data are stored in the local storage path, loading the cache webpage data to locally open a target webpage corresponding to the webpage activation request
If the cached webpage data corresponding to the uniform resource locator are not stored locally, the webpage activation request is sent to a server, and the step of loading the corresponding webpage data from the server to open the target webpage from the online comprises the following steps:
and if the available cached webpage data are not stored in the local storage path, sending the webpage activation request to a server, and loading corresponding webpage data from the server to open the target webpage online.
Wherein, the preset rule is as follows: removing a protocol field of the uniform resource locator header and a delimiter following the protocol field. For example:
when the uniform resource locator is http:// b.pingan.com.cn/creditcard/index.html, the modified local storage path is b.pingan.com.cn/creditcard/index.html, i.e. the index.html file under b.pingan.com.cn/creditcard/html.
In specific implementation, the downloaded offline cache data may be stored in the local storage path modified by the corresponding uniform resource locator.
In addition, the step of determining whether the available cached webpage data is stored in the local storage path may be performed as follows: judging whether cache webpage data are stored under a local storage path or not, if the cache webpage data do not exist under the local storage path, representing that the cache webpage data do not exist under the local storage path, if the cache webpage data exist under the local storage path, judging whether the cache webpage data are available, if the cache webpage data are unavailable, representing that the available cache webpage data do not exist under the local storage path, and if the cache webpage data are available, representing that the available cache webpage data exist under the local storage path.
In order to further optimize the embodiment, before the step of modifying the uniform resource locator to the local storage path according to the preset rule, the method for opening the web page may further include:
judging whether the uniform resource locator is located in a preset white list, wherein the preset white list is prestored with uniform resource locators corresponding to all webpages capable of being loaded offline;
if the uniform resource locator is located in a preset white list, modifying the uniform resource locator into a local storage path according to a preset rule;
and if the uniform resource locator is not located in a preset white list, sending the webpage activation request to a server.
In order to further optimize the embodiment, after the step of sending the web page activation request to the server, the web page opening method may further include:
and downloading the webpage data corresponding to the uniform resource locator from the server, and packaging and storing the webpage data in the local.
It should be noted that, when the uniform resource locator in the web page activation request is in the preset white list but the cache data corresponding to the uniform resource locator is not stored locally, the web page activation request is sent to the server to load the web page from the online, and at the same time, the web page data corresponding to the uniform resource locator is downloaded from the server and is packaged and stored locally, so that when the web page is requested to be opened again next time, the loading can be switched to the local loading. And when the uniform resource locator in the webpage activation request is not in the preset white list, sending the webpage activation request to a server so as to load the webpage from the online, but not downloading webpage data.
Further, in another embodiment of the method of the present invention, the method for opening a web page further includes:
and automatically accessing the server at preset time intervals to update the cached webpage data.
In order to ensure the validity of the data, an automatic updating mechanism is set, namely, the server is automatically accessed to update the cached webpage data every preset time (for example, 5 seconds).
The invention also provides a webpage opening device. Fig. 2 is a schematic diagram illustrating an internal structure of a web page opening device according to an embodiment of the present invention.
In the present embodiment, the web page opening device 1 may be a PC (Personal Computer), or may be a terminal device such as a smartphone, a tablet Computer, or a mobile Computer. The web page opening device 1 comprises at least a memory 11, a processor 12, a network interface 13, and a communication bus 14.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the web page opening apparatus 1, such as a hard disk of the web page opening apparatus 1. The memory 11 may also be an external storage device of the web page opening apparatus 1 in other embodiments, such as a plug-in hard disk provided on the web page opening apparatus 1, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 11 may also include both an internal storage unit and an external storage device of the web page opening apparatus 1. The memory 11 may be used not only to store application software installed in the web page opening apparatus 1 and various types of data, such as a code of the web page opening program 01, but also to temporarily store data that has been output or is to be output.
The processor 12 may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor or other data Processing chip in some embodiments, and is used for executing program codes stored in the memory 11 or Processing data, such as executing the web page opening program 01.
The network interface 13 may optionally comprise a standard wired interface, a wireless interface (e.g. WI-FI interface), typically used for establishing a communication connection between the apparatus 1 and other electronic devices.
The communication bus 14 is used to enable connection communication between these components.
Optionally, the web page opening apparatus 1 may further include a user interface, the user interface may include a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface may further include a standard wired interface and a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-emitting diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the web page opening apparatus 1 and for displaying a visual user interface.
Fig. 2 shows only the web page opening apparatus 1 having the components 11-14 and the web page opening program 01, and it will be understood by those skilled in the art that the structure shown in fig. 1 does not constitute a limitation of the web page opening apparatus 1, and may include fewer or more components than those shown, or combine some components, or arrange different components.
In the embodiment of the web page opening apparatus 1 shown in fig. 2, a web page opening program 01 is stored in the memory 11; the processor 12 executes the web page opening program 01 stored in the memory 11 to implement the following steps:
when a webpage activation request is received, acquiring a uniform resource locator in the webpage activation request;
judging whether cache webpage data corresponding to the uniform resource locator are stored locally or not according to the uniform resource locator;
if cache webpage data corresponding to the uniform resource locator are stored locally, loading the cache webpage data to locally open a target webpage corresponding to the webpage activation request;
and if the cached webpage data corresponding to the uniform resource locator are not stored locally, sending the webpage activation request to a server so as to load the corresponding webpage data from the server and open the target webpage online.
According to the webpage opening device provided by the embodiment, the cache data (such as the offline plug-in) of the webpage are downloaded and stored locally, so that the corresponding cache webpage data stored locally can be directly loaded when the webpage is accessed subsequently, the webpage is loaded offline, the access time is saved, and the white screen response time is shortened. Meanwhile, the webpage opening method also realizes free switching of online and offline access of the webpage.
Further, in another embodiment of the apparatus of the present invention, the web page opening program 01 may also be called by the processor to implement the following steps:
and constructing a page of the webpage according to the webpage data, and synchronously rendering page elements in the webpage data into the constructed page.
The webpage opening device in the embodiment loads webpage data from a local place or an online place, and synchronously performs page construction and page rendering in the loading process, namely page elements are rendered into a corresponding container in advance in the page construction stage, instead of rendering the page after the page construction is finished, so that the content can be displayed when the page is loaded, and the white screen time is further shortened.
Further, in another embodiment of the apparatus of the present invention, the web page opening program 01 may also be called by the processor to implement the following steps:
modifying the uniform resource locator into a local storage path according to a preset rule;
judging whether available cached webpage data are stored under the local storage path;
if available cache webpage data are stored in the local storage path, loading the cache webpage data;
and if the available cached webpage data are not stored in the local storage path, sending the webpage activation request to a server.
Wherein, the preset rule is as follows: removing a protocol field of the uniform resource locator header and a delimiter following the protocol field. For example:
when the uniform resource locator is http:// b.pingan.com.cn/creditcard/index.html, the modified local storage path is b.pingan.com.cn/creditcard/index.html, i.e. the index.html file under b.pingan.com.cn/creditcard/html.
In specific implementation, the downloaded offline cache data may be stored in the local storage path modified by the corresponding uniform resource locator.
In addition, the step of determining whether the available cached webpage data is stored in the local storage path may be performed as follows: judging whether cache webpage data are stored under a local storage path or not, if the cache webpage data do not exist under the local storage path, representing that the cache webpage data do not exist under the local storage path, if the cache webpage data exist under the local storage path, judging whether the cache webpage data are available, if the cache webpage data are unavailable, representing that the available cache webpage data do not exist under the local storage path, and if the cache webpage data are available, representing that the available cache webpage data exist under the local storage path.
Further, in another embodiment of the apparatus of the present invention, the web page opening program 01 may also be called by the processor to implement the following steps:
judging whether the uniform resource locator is located in a preset white list, wherein the preset white list is prestored with uniform resource locators corresponding to all webpages capable of being loaded offline;
if the uniform resource locator is judged to be located in a preset white list, modifying the uniform resource locator into a local storage path according to a preset rule;
and if the uniform resource locator is not positioned in a preset white list, sending the webpage activation request to a server.
Further, in another embodiment of the apparatus of the present invention, the web page opening program 01 may also be called by the processor to implement the following steps:
and downloading the webpage data corresponding to the uniform resource locator from the server, and packaging and storing the webpage data in the local.
It should be noted that, when the uniform resource locator in the web page activation request is in the preset white list but the cache data corresponding to the uniform resource locator is not stored locally, the web page activation request is sent to the server to load the web page from the online, and at the same time, the web page data corresponding to the uniform resource locator is downloaded from the server and is packaged and stored locally, so that when the web page is requested to be opened again next time, the loading can be switched to the local loading. And when the uniform resource locator in the webpage activation request is not in the preset white list, sending the webpage activation request to a server so as to load the webpage from the online, but not downloading webpage data.
Further, in another embodiment of the apparatus of the present invention, the web page opening program 01 may also be called by the processor to implement the following steps:
and automatically accessing the server at preset time intervals to update the cached webpage data.
Alternatively, in other embodiments, the web page opening program 01 may be further divided into one or more modules, and the one or more modules are stored in the memory 11 and executed by one or more processors (in this embodiment, the processor 12) to implement the present invention.
For example, referring to fig. 3, which is a schematic diagram illustrating program modules of a web page opening program in an embodiment of the web page opening apparatus of the present invention, in this embodiment, the web page opening program 01 may be divided into an information obtaining module 10, a data determining module 20, a local loading module 30, and an online loading module 40, which exemplarily:
the information acquisition module 10 is configured to: when a webpage activation request is received, acquiring a uniform resource locator in the webpage activation request;
the data judgment module 20 is configured to: judging whether cache webpage data corresponding to the uniform resource locator are stored locally or not according to the uniform resource locator;
the local load module 30 is configured to: when cached webpage data corresponding to the uniform resource locator are stored locally, loading the cached webpage data to locally open a target webpage corresponding to the webpage activation request;
and the online loading module 40 is configured to send the web page activation request to a server when cache web page data corresponding to the uniform resource locator is not locally stored, so as to load corresponding web page data from the server, and open the target web page online.
The functions or operation steps of the information obtaining module 10, the data determining module 20, the local loading module 30, and the online loading module 40 when executed are substantially the same as those of the above embodiments, and are not described herein again.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, where a web page opening program is stored on the computer-readable storage medium, and the web page opening program is executable by one or more processors to implement the following operations:
when a webpage activation request is received, acquiring a uniform resource locator in the webpage activation request;
judging whether cache webpage data corresponding to the uniform resource locator are stored locally or not according to the uniform resource locator;
if cache webpage data corresponding to the uniform resource locator are stored locally, loading the cache webpage data to locally open a target webpage corresponding to the webpage activation request;
and if the cached webpage data corresponding to the uniform resource locator are not stored locally, sending the webpage activation request to a server so as to load the corresponding webpage data from the server and open the target webpage online.
The embodiment of the computer readable storage medium of the present invention is substantially the same as the embodiments of the web page opening apparatus and method, and will not be described herein again.
It should be noted that the above-mentioned numbers of the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, herein are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method 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, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. 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 (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A webpage opening method is characterized by comprising the following steps:
when a webpage activation request is received, acquiring a uniform resource locator in the webpage activation request;
judging whether cached webpage data corresponding to the uniform resource locator are stored locally or not according to the uniform resource locator;
and if the cached webpage data corresponding to the uniform resource locator are locally stored, loading the cached webpage data so as to locally open the target webpage corresponding to the webpage activation request.
2. The method for opening a web page according to claim 1, wherein after the step of determining whether cached web page data corresponding to the uniform resource locator is locally stored, the method further comprises:
and if the cached webpage data corresponding to the uniform resource locator are not stored locally, sending the webpage activation request to a server, and loading the corresponding webpage data from the server to open the target webpage online.
3. The web page opening method of claim 2, wherein the step of loading the web page data from the server or from the server comprises:
and constructing a page of the webpage according to the webpage data, and synchronously rendering page elements in the webpage data into the constructed page.
4. The method for opening a web page according to claim 2, wherein the step of determining whether cached web page data corresponding to the uniform resource locator is stored locally according to the uniform resource locator comprises:
modifying the uniform resource locator into a local storage path according to a preset rule;
judging whether available cached webpage data are stored under the local storage path;
if the cached webpage data corresponding to the uniform resource locator is locally stored, the step of loading the cached webpage data to locally open the target webpage corresponding to the webpage activation request includes:
if the available cache webpage data are stored in the local storage path, loading the cache webpage data to locally open a target webpage corresponding to the webpage activation request
If the cached webpage data corresponding to the uniform resource locator are not stored locally, the webpage activation request is sent to a server, and the step of loading the corresponding webpage data from the server to open the target webpage from the online comprises the following steps:
and if the available cached webpage data are not stored in the local storage path, sending the webpage activation request to a server, and loading corresponding webpage data from the server to open the target webpage online.
5. The method for opening a web page according to claim 4, wherein before the step of modifying the uniform resource locator to a local storage path according to a preset rule, the method further comprises the steps of:
judging whether the uniform resource locator is located in a preset white list, wherein the preset white list is prestored with uniform resource locators corresponding to all webpages capable of being loaded offline;
if the uniform resource locator is located in a preset white list, executing a step of modifying the uniform resource locator into a local storage path according to a preset rule;
and if the uniform resource locator is not located in a preset white list, executing the step of sending the webpage activation request to a server.
6. The web page opening method of claim 5, further comprising, after the step of transmitting the web page activation request to a server:
and downloading the webpage data corresponding to the uniform resource locator from the server, and packaging and storing the webpage data in the local.
7. The web page opening method according to claim 4 or 5, wherein the preset rule is: removing a protocol field of the uniform resource locator header and a delimiter following the protocol field.
8. The web page opening method of claim 1, further comprising:
and automatically accessing the server at preset time intervals to update the cached webpage data.
9. A web page opening apparatus, characterized in that the apparatus comprises a memory and a processor, the memory stores a web page opening program which can run on the processor, and the web page opening program, when executed by the processor, realizes the steps of the web page opening method according to any one of claims 1 to 8.
10. A computer-readable storage medium, having a web page opening program stored thereon, the web page opening program being executable by one or more processors to implement the steps of the web page opening method according to any one of claims 1 to 8.
CN201910884361.XA 2019-09-18 2019-09-18 Webpage opening method and device and computer readable storage medium Pending CN110795650A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910884361.XA CN110795650A (en) 2019-09-18 2019-09-18 Webpage opening method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910884361.XA CN110795650A (en) 2019-09-18 2019-09-18 Webpage opening method and device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN110795650A true CN110795650A (en) 2020-02-14

Family

ID=69427308

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910884361.XA Pending CN110795650A (en) 2019-09-18 2019-09-18 Webpage opening method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110795650A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112115396A (en) * 2020-09-21 2020-12-22 北京达佳互联信息技术有限公司 Webpage rendering method, device, equipment and storage medium
CN112148385A (en) * 2020-09-28 2020-12-29 睿住科技有限公司 Data loading method, system and computer readable storage medium
CN112256342A (en) * 2020-09-22 2021-01-22 北京达佳互联信息技术有限公司 Page loading method and device and server
CN112528274A (en) * 2020-12-24 2021-03-19 微医云(杭州)控股有限公司 Data processing method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103607385A (en) * 2013-11-14 2014-02-26 北京奇虎科技有限公司 Method and apparatus for security detection based on browser
CN105701153A (en) * 2015-12-29 2016-06-22 北京金山安全软件有限公司 Method and device for reading webpage resources and electronic equipment
US20160232252A1 (en) * 2013-09-27 2016-08-11 Beijing Qihoo Technology Company Limited Method for loading webpage, device and browser thereof
CN108228818A (en) * 2017-12-29 2018-06-29 网易(杭州)网络有限公司 Web page resources loading method and device, electronic equipment and storage medium
CN109800370A (en) * 2018-12-14 2019-05-24 平安普惠企业管理有限公司 Display methods, device, computer equipment and the storage medium of Webpage

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160232252A1 (en) * 2013-09-27 2016-08-11 Beijing Qihoo Technology Company Limited Method for loading webpage, device and browser thereof
CN103607385A (en) * 2013-11-14 2014-02-26 北京奇虎科技有限公司 Method and apparatus for security detection based on browser
CN105701153A (en) * 2015-12-29 2016-06-22 北京金山安全软件有限公司 Method and device for reading webpage resources and electronic equipment
CN108228818A (en) * 2017-12-29 2018-06-29 网易(杭州)网络有限公司 Web page resources loading method and device, electronic equipment and storage medium
CN109800370A (en) * 2018-12-14 2019-05-24 平安普惠企业管理有限公司 Display methods, device, computer equipment and the storage medium of Webpage

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112115396A (en) * 2020-09-21 2020-12-22 北京达佳互联信息技术有限公司 Webpage rendering method, device, equipment and storage medium
CN112115396B (en) * 2020-09-21 2024-04-02 北京达佳互联信息技术有限公司 Webpage rendering method, device, equipment and storage medium
CN112256342A (en) * 2020-09-22 2021-01-22 北京达佳互联信息技术有限公司 Page loading method and device and server
CN112148385A (en) * 2020-09-28 2020-12-29 睿住科技有限公司 Data loading method, system and computer readable storage medium
CN112148385B (en) * 2020-09-28 2023-11-10 广东睿住智能科技有限公司 Data loading method, system and computer readable storage medium
CN112528274A (en) * 2020-12-24 2021-03-19 微医云(杭州)控股有限公司 Data processing method and device, electronic equipment and storage medium
CN112528274B (en) * 2020-12-24 2023-09-22 微医云(杭州)控股有限公司 Data processing method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110795650A (en) Webpage opening method and device and computer readable storage medium
US8527862B2 (en) Methods for making ajax web applications bookmarkable and crawlable and devices thereof
US7698256B1 (en) History support for stateless Javascript Web client
CN107040584B (en) Method and device for downloading picture by client
CN110020367B (en) Page rendering method and device
CN102375882A (en) Method, device and browser for rapidly accessing webpage
CN110990736A (en) Page loading method and device, terminal equipment and storage medium
CN108200132B (en) Resource acquisition method, device, equipment and computer readable storage medium
WO2015158304A1 (en) Data processing method and apparatus
US10594764B2 (en) Request cache to improve web applications performance
CN111079048B (en) Page loading method and device
CN112612982A (en) Webpage preloading method and device and computer equipment
CN112685669A (en) Page rendering method and system
CN106713395B (en) Data downloading method and device
US20140245124A1 (en) System and method thereof for browser agnostic extension models
CN112926002A (en) Service request processing method and device
US10095791B2 (en) Information search method and apparatus
CN112818270A (en) Data cross-domain transfer method and device and computer equipment
CN105955980B (en) File downloading device and method
AU2012327879B2 (en) Data interchange system
CN103793459B (en) Webpage opening method and device
CN107391132B (en) Method, device and equipment for target App to execute preset action
CN111338928A (en) Chrome-based browser testing method and device
CN112672187B (en) Page generation method and device, computer equipment and readable storage medium
CN104679786B (en) Form processing method and device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200214

RJ01 Rejection of invention patent application after publication