CN112163173B - Webpage loading method, webpage loading device, electronic equipment and computer readable storage medium - Google Patents

Webpage loading method, webpage loading device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN112163173B
CN112163173B CN202011001582.7A CN202011001582A CN112163173B CN 112163173 B CN112163173 B CN 112163173B CN 202011001582 A CN202011001582 A CN 202011001582A CN 112163173 B CN112163173 B CN 112163173B
Authority
CN
China
Prior art keywords
webpage
website
view
configuration information
loading
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
CN202011001582.7A
Other languages
Chinese (zh)
Other versions
CN112163173A (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.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology 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 Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN202011001582.7A priority Critical patent/CN112163173B/en
Publication of CN112163173A publication Critical patent/CN112163173A/en
Application granted granted Critical
Publication of CN112163173B publication Critical patent/CN112163173B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

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 loading method, a webpage loading device, electronic equipment and a computer readable storage medium. The method comprises the following steps: loading a first webpage corresponding to a first website in the created webpage view; when a loading instruction for a second website is acquired from the first webpage, private data of the first website are cleared; and loading a second webpage corresponding to the second website on the webpage view from which the private data is cleared. The method of the application can reduce occupied memory.

Description

Webpage loading method, webpage loading device, electronic equipment and computer readable storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method and apparatus for loading a web page view, an electronic device, and a computer readable storage medium.
Background
In the mobile internet age today, web page views (Webview) are widely used. The conventional web page view loading method is to create a new web page view before opening the web page and then load the web page. The traditional webpage loading method has the problem of large occupied memory.
Disclosure of Invention
The embodiment of the application provides a webpage loading method, a webpage loading device, electronic equipment and a computer readable storage medium, which can reduce occupied memory.
A web page loading method, comprising:
loading a first webpage corresponding to a first website in the created webpage view;
when a loading instruction for a second website is acquired from the first webpage, private data of the first website are cleared;
and loading a second webpage corresponding to the second website on the webpage view from which the private data is cleared.
A web page loading apparatus comprising:
the first loading module is used for loading a first webpage corresponding to the first website in the created webpage view;
The clearing module is used for clearing private data of the first website when a loading instruction for the second website is acquired from the first webpage;
And the second loading module is used for loading a second webpage corresponding to the second website on the webpage view from which the private data is cleared.
An electronic device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of:
loading a first webpage corresponding to a first website in the created webpage view;
when a loading instruction for a second website is acquired from the first webpage, private data of the first website are cleared;
and loading a second webpage corresponding to the second website on the webpage view from which the private data is cleared.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
loading a first webpage corresponding to a first website in the created webpage view;
when a loading instruction for a second website is acquired from the first webpage, private data of the first website are cleared;
and loading a second webpage corresponding to the second website on the webpage view from which the private data is cleared.
According to the webpage loading method, the device, the electronic equipment and the computer readable storage medium, the first webpage corresponding to the first website is loaded in the created webpage view, when a loading instruction for the second website is acquired on the first webpage, private data of the first website is cleared, the second webpage corresponding to the second website is loaded on the webpage view with the cleared private data, namely, the second website is triggered on the first webpage, the first website and the second website can share the same webpage view, multiplexing of the webpage view can be achieved, conventional repeated creation and destruction of the webpage view and the process flow of using the webpage view are avoided, operation of other tasks is not affected, performance and memory occupation of electronic equipment are reduced, display speed of the webpage is accelerated, and use of the webpage view is simplified.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method of loading a web page in one embodiment;
FIG. 2 is a time-axis diagram of a method for loading a web page according to one embodiment;
FIG. 3 is a schematic block diagram illustrating a web page loading method according to an embodiment;
FIG. 4 is a flowchart of a method for loading a web page according to another embodiment;
FIG. 5 is a block diagram of a web page loading device according to one embodiment;
fig. 6 is a schematic diagram of an internal structure of an electronic device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
It will be understood that the terms first, second, etc. as used herein may be used to describe various information, but such information is not limited by these terms. These terms are only used to distinguish one message from another. For example, a first web page may be referred to as a second web page, and similarly, a second web page may be referred to as a first web page, without departing from the scope of the application. The first web page and the second web page are both pages, but they are not the same page.
FIG. 1 is a flow chart of a method of loading a web page in one embodiment. The webpage loading method in this embodiment is described taking the operation on the electronic device as an example. As shown in fig. 1, the web page loading method includes steps 101 to 106. Wherein:
Step 102, loading a first webpage corresponding to the first website in the created webpage view.
Among them, a web page view (Webview) is a component for displaying web pages. The web address is used to represent the address of the web page. The web address may specifically be a URL (uniform resource locator ). The first web page refers to a page of a first website.
Specifically, the electronic device creates a web page view. The electronic device may obtain, on the browser application, a first website input by the user or a first website corresponding to the browser control triggered by the user. And loading a first webpage corresponding to the first website in the created webpage view. The content of the first web page may be displayed in the browser.
Step 104, when a loading instruction for the second website is acquired on the first webpage, the private data of the first website is cleared.
The private data (PRIVATE DATA) of the first website refers to data that is not commonly used between the first website and other websites. Private data may be, for example, user login data, non-generic business data, and data related to instances of web page views.
Specifically, the input second website can be acquired in the website input area of the first webpage. Or the electronic equipment acquires the loading instruction of the second website corresponding to the control by triggering the control on the first webpage. When a loading instruction for the second website is acquired on the first webpage, the electronic equipment clears the private data of the first website.
And 106, loading a second webpage corresponding to the second website on the webpage view from which the private data is cleared.
Specifically, the electronic device loads a second webpage corresponding to the second website on the webpage view from which the private data has been cleared. Namely, the electronic equipment loads a second webpage corresponding to a second website on the same webpage view.
According to the webpage loading method, the first webpage corresponding to the first website is loaded in the created webpage view, when a loading instruction for the second website is acquired on the first webpage, private data of the first website is cleared, the second webpage corresponding to the second website is loaded on the webpage view with the cleared private data, namely, the second website is triggered on the first webpage, the first website and the second website can share the same webpage view, multiplexing of the webpage view can be achieved, webpage switching experience below 10 milliseconds is provided, conventional repeated creation and destruction of the webpage view and the process used by the webpage view are avoided, operation of other tasks is not affected, performance and memory occupation of electronic equipment are reduced, display speed of the webpage page is accelerated, use of the webpage view is simplified, and the webpage loading method is more friendly to developers and improves user experience.
In one embodiment, the second web address is a web address corresponding to a light application, a web application, or a hybrid application. Loading a second webpage corresponding to a second website on the webpage view from which the private data has been cleared, including: acquiring preset webpage configuration information corresponding to a second website; and loading preset webpage configuration information corresponding to the second website on the webpage view from which the private data is cleared.
The Light application (Light APP) refers to an application program that is ready to use without downloading or searching. A Web application (Web APP) refers to an application software that operates on the internet or an intranet using a Web browser. Hybrid App refers to a combination of native and web applications. Native applications refer to applications developed for some type of operating system. The preset web page configuration information refers to some information which is locally preconfigured and is used for configuring the web page. For example, the preset web page configuration information may be theme style configuration information, etc., not limited thereto.
Specifically, the web address and the corresponding web page configuration information are correspondingly stored in an application program package (Application package, application program package). The electronic equipment reads preset webpage configuration information corresponding to the second website from the cache, and loads the preset webpage configuration information corresponding to the second website on the webpage view from which the private data is cleared. The electronic equipment can acquire the resource information corresponding to the second website from the server, and load and render the resource information corresponding to the second website on the view of the cleaned private data webpage. The resource information is the content of the second website, and the resource information may be displayed on a second webpage corresponding to the second website.
In the webpage loading method in this embodiment, since the number of websites included in the light application, the webpage application or the hybrid application is limited, the websites and the corresponding webpage configuration information can be saved correspondingly, and by acquiring the preset webpage configuration information corresponding to the second website and loading the preset webpage configuration information corresponding to the second website on the webpage view from which the private data has been cleared, the interfaces such as the webpage view and the webpage setting do not need to be repeatedly called, so that the specific configuration information of the webpage can be directly loaded, and the webpage loading efficiency on the light application, the webpage application or the hybrid application is improved.
In one embodiment, loading a second web page corresponding to the second web address on the web page view from which the private data has been cleared includes: determining a target website type of the second website; acquiring preset webpage configuration information corresponding to a target website type; and loading preset network configuration information corresponding to the target website type on the webpage view from which the private data is cleared.
In the browser, different websites may be classified into, for example, video, news, and map. Some web page configuration information corresponding to the same web site type is the same or similar.
Specifically, the electronic device may locally pre-store the website and the corresponding website type. Or the electronic device may determine the target web site type of the second web site according to the second domain name or the third domain name of the web site, and the like. The electronic equipment acquires preset webpage configuration information corresponding to the target website type. And the electronic equipment loads preset network configuration information corresponding to the target website type on the webpage view from which the private data is cleared. The electronic device can acquire the resource information corresponding to the second website from the server, and load the resource information corresponding to the second website on the view of the purged private data webpage. The resource information is the content of the second website, and the resource information may be displayed on a second webpage corresponding to the second website.
In the webpage loading method in this embodiment, since some configuration information of the same website type is the same, the website and the webpage configuration information can be stored correspondingly in advance; the target website type of the second website is determined, preset webpage configuration information corresponding to the target website type is obtained, and the preset network configuration information corresponding to the target website type is loaded on the webpage view from which the private data is cleared, so that some general configuration information of a website of a certain type can be rapidly loaded, and the webpage loading efficiency is improved.
In one embodiment, before loading a first web page corresponding to a first web address in a created web page view, the method includes: starting an application program; preloading relevant processes of the webpage view and webpage view configuration information in a time period in an idle state after an application program is started; a web page view is created based on the relevant progress of the web page view and the web page view configuration information.
The application program refers to an application program capable of displaying a webpage. The application may be in particular an android application. For example, the application may be referred to as a browser. The web view configuration information refers to information for configuring a web view. The web view configuration information may be, for example, an SO (Shared Object) file, a process of initializing a web view, initializing a network, acquiring resources of a web view, general web view configuration information, and the like.
Specifically, the electronic device acquires a start instruction of the application program, and starts the application program based on the start instruction. And calling a preloading interface to execute a relevant process of preloading (preload) the webpage view and webpage view configuration information of the webpage view in a time period that the process is in an idle state after the application program is started. A web page view is created based on the relevant progress of the web page view and the web page view configuration information.
FIG. 2 is a time axis diagram of a web page loading method according to one embodiment. After the electronic device starts the application program, the relevant process of the webpage view and the webpage view configuration information are preloaded in the Idle state (Idle) time period. The configuration information of the web page view is such as SO (Shared Object) file, process of initializing the web page view, network environment, resource of acquiring the web page view and general configuration information of the web page view. And loading the first webpage corresponding to the first website on the webpage view by using the webpage view. The electronic equipment starts an application program and provides a pre-starting interface for a user to call in a main process task scheduling gap, and the method is mainly used for starting a webpage view related process, initializing a network environment and the like and loading necessary resources before the user uses the webpage view, and in addition, some general and service independent configurations are preset.
According to the webpage loading method, the initialization of the webpage view belongs to the most time-consuming link, a large amount of time is consumed for creating a new webpage view each time, loading speed is influenced, an application main process is blocked, experience is very influenced, and by starting an application program, relevant processes of the webpage view and webpage view configuration information are preloaded in a time period in an idle state after the application program is started; when the webpage view creation instruction is acquired, the webpage view is created based on the webpage view configuration information, so that the idle time after the application program is started can be fully utilized for loading the webpage view, and the loading efficiency of the webpage view is improved.
In one embodiment, the webpage loading method further comprises: writing the configuration information of the webpage view into a configuration resource pool of the webpage view through an application program component; when a modification instruction for the webpage view configuration information is detected, the webpage view configuration information in the configuration resource pool is modified based on the modification instruction, and the modified webpage view configuration information is obtained. And acquiring the modified webpage view configuration information from the configuration resource pool, and executing the related process of preloading the webpage view and the webpage view configuration information.
The application component may specifically be APK (Application package ). The configuration resource pool is used for storing configuration information of the webpage view.
Specifically, the electronic device writes the configuration information of the webpage view into a configuration resource pool corresponding to the webpage view through the application program component. When a modification instruction for the webpage view configuration information is detected, the webpage view configuration information in the configuration resource pool is modified based on the modification instruction, and the modified webpage view configuration information is obtained. And in the idle state time period after the application program is started, the electronic equipment acquires the modified webpage view configuration information from the configuration resource pool and executes the step of preloading the webpage view configuration information.
In this embodiment, as shown in fig. 3, a schematic architecture flow chart of a web page loading method in one embodiment is shown. Comprising the following steps:
in step 302, the web page view configuration information is written into a configuration resource pool of the web page view by the application component.
In step 304, the application component receives a web page view creation instruction.
Step 306, the web page view configuration information is read from the configuration resource pool, and the web page view is configured based on the web page view configuration information.
In step 308, the application component detects a modification instruction to the configuration information of the web page view, and modifies the configuration information of the web page view in the configuration resource pool based on the modification instruction, thereby obtaining modified configuration information of the web page view.
Specifically, the web page view provides an interface for external dynamic addition reading and selection.
In step 310, the application component receives a web page view creation instruction.
Step 312, the modified web page view configuration information is obtained from the configuration resource pool, and the step of preloading the web page view configuration information is performed.
According to the webpage loading method, the application program component writes the webpage view configuration information into the configuration resource pool of the webpage view, even if a user can configure in advance, the configuration information in the configuration resource pool can be modified before new webpage view configuration information is loaded, a large amount of management codes are saved, and development is focused on design development of core business.
In one embodiment, clearing private data of a first web site includes: and clearing the non-universal service data corresponding to the first website, the data related to the example of the webpage view and the user login data input on the first webpage.
Specifically, the non-general service data, that is, the data of the first web site that is different from the other web sites, that is, the service data is not general to the other web sites. Data related to an instance of a web page view may refer to cached data, navigation data, history, and the like. The user login data may include a user name and password for the user to login to the website. The electronic equipment provides a private data clearing interface, and invokes the private data clearing interface to realize the function of recovering the initialization state of the webpage view, and clear non-universal service data corresponding to the first website, data related to webpage view examples, such as caching, navigation, history records and the like, user login data and the like. The interface is called before the second webpage corresponding to the second website is loaded, the time for clearing the data is short, and the use experience is not affected.
In the webpage loading method in this embodiment, because some non-universal service data, data related to the instance of the webpage view and user login data are not needed for the second website in general, by clearing the non-universal service data corresponding to the first website, the data related to the instance of the webpage view and the user login data input on the first webpage, the second webpage corresponding to the second website can be loaded on the webpage view from which the private data has been cleared.
In one embodiment, the private data includes user login data. Clearing private data of a first web site, including: determining the security level of a first website; and when the security level is lower than the preset level, clearing the user login data input on the first webpage.
In particular, the security level is used to indicate the degree of security. The higher the security level, the better the security; the lower the security level, the worse the security. When the security level is lower than the preset level, the electronic equipment clears the user login data input on the first webpage.
According to the webpage loading method, the security level of the first website is determined, when the security level is lower than the preset level, the user login data input on the first webpage are cleared, and when the first website is not secure, the security of the user login data can be guaranteed.
In one embodiment, the webpage loading method further comprises: and when the security level is higher than the preset level, saving the user login data input on the first webpage.
According to the webpage loading method, when the security level is higher than the preset level, the user login data input on the first webpage are stored, so that when the user opens the first webpage next time, the user does not need to input login data again, and the convenience of operation is improved.
In one embodiment, a method for loading a web page includes:
step a1, starting an application program.
Step a2, preloading relevant processes of the webpage view and webpage view configuration information in a time period in an idle state after starting the application program.
And a3, writing the configuration information of the webpage view into a configuration resource pool of the webpage view through an application program component.
And a step a4 of modifying the webpage view configuration information in the configuration resource pool based on the modification instruction when the modification instruction of the webpage view configuration information is detected, and obtaining modified webpage view configuration information.
And a step a5, acquiring modified webpage view configuration information from the configuration resource pool, and creating the webpage view based on the related process of the webpage view and the webpage view configuration information.
And a step a6, loading a first webpage corresponding to the first website in the created webpage view.
And a step a7, when a loading instruction for the second website is acquired on the first webpage, and when the security level of the first website is lower than a preset level, clearing the user login data input on the first webpage.
And a step a8, when the security level is higher than the preset level, saving the user login data input on the first webpage.
Step a9, clearing the non-universal service data corresponding to the first website and the data related to the example of the webpage view.
Step a10, obtaining preset webpage configuration information corresponding to the second website.
Step a11, loading preset webpage configuration information corresponding to the second website on the webpage view from which the private data is cleared.
According to the webpage loading method, the first webpage corresponding to the first website is loaded in the created webpage view, when a loading instruction for the second website is acquired on the first webpage, private data of the first website is cleared, the second webpage corresponding to the second website is loaded on the webpage view with the cleared private data, namely, the second website is triggered on the first webpage, the first website and the second website can share the same webpage view, multiplexing of the webpage view can be achieved, webpage switching experience below 10 milliseconds is provided, conventional repeated creation and destruction of the webpage view and the process used by the webpage view are avoided, operation of other tasks is not affected, performance and memory occupation of electronic equipment are reduced, display speed of the webpage page is accelerated, use of the webpage view is simplified, and the webpage loading method is more friendly to developers and improves user experience.
In one embodiment, as shown in fig. 4, a flow chart of a web page loading method in another embodiment is shown. The electronic equipment initializes the webpage view and loads a first webpage corresponding to the first website. Initializing a web page view includes initializing a process (Init process), preparing an environment (prepare environment), and creating a new web page view. Loading the first web page corresponding to the first web address comprises loading first web page configuration information. Configuration information such as uniform resource locators and web page configuration (Websettings). Clearing private data corresponding to the first website includes clearing non-universal configuration information, cache data corresponding to the first website, some other data in a browser database, and the like.
In the current mobile internet age, web page applications are increasingly appeared on mobile terminal equipment, web page views are widely applied, by using the method in the embodiment of the application, the starting speed of web pages can be accelerated, memory and CPU resources are saved, especially the effect on low-end performance equipment is obvious, and the management difficulty of the web page views is reduced by configuration management, so that the development personnel can focus energy on service design more conveniently, for example:
1) In the scene of the multi-label page of the light application engine, repeated starting of the webpage view when a new label is opened each time is avoided, the time consumption of 300-500ms can be saved, and when the webpage switching action occurs, the request and the display of the webpage resource are directly carried out, so that the effect of really opening in seconds is achieved.
2) In the browser, different websites can be classified, such as video, news and the like, or websites with different security levels can be configured directly through configuration management provided by the embodiment of the application, so that a large amount of management codes are saved, and development is focused on design and development of core business.
The application of the method in the embodiment of the application not only can improve the experience of the application on the hybrid application and reduce the dependence on the equipment performance, but also is more beneficial to achieving the second opening effect on the application similar to a light application engine.
It should be understood that, although the steps in the flowcharts of fig. 1 to 4 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 1 to 4 may comprise a plurality of sub-steps or phases, which are not necessarily performed at the same time, but may be performed at different times, nor does the order of execution of the sub-steps or phases necessarily follow one another, but may be performed alternately or alternately with at least a portion of the sub-steps or phases of other steps or other steps.
Fig. 5 is a block diagram of a configuration of a web page loading device according to an embodiment. As shown in fig. 5, a web page loading device includes a first loading module 502, a clearing module 504, and a second loading module 506, where:
The first loading module 502 is configured to load a first web page corresponding to a first web address in the created web page view;
a clearing module 504, configured to clear private data of the first web address when a load instruction for the second web address is acquired on the first web page;
the second loading module 506 is configured to load a second web page corresponding to the second web address on the web page view from which the private data has been cleared.
According to the webpage loading device, the first webpage corresponding to the first website is loaded in the created webpage view, when a loading instruction for the second website is acquired on the first webpage, private data of the first website is cleared, the second webpage corresponding to the second website is loaded on the webpage view with the cleared private data, namely, the second website is triggered on the first webpage, the first website and the second website can share the same webpage view, multiplexing of the webpage view can be achieved, webpage switching experience below 10 milliseconds is provided, conventional repeated creation and destruction of the webpage view and the process used by the webpage view are avoided, operation of other tasks is not affected, performance and memory occupation of electronic equipment are reduced, display speed of the webpage page is accelerated, use of the webpage view is simplified, and the webpage loading device is more friendly to a developer and user experience is improved.
In one embodiment, the second web address is a web address corresponding to a light application, a web application, or a hybrid application. The second loading module 506 is configured to obtain preset web page configuration information corresponding to the second web address; and loading preset webpage configuration information corresponding to the second website on the webpage view from which the private data is cleared.
In the webpage loading device in this embodiment, since the number of websites included in the light application, the webpage application or the hybrid application is limited, the websites and the corresponding webpage configuration information can be saved correspondingly, and by acquiring the preset webpage configuration information corresponding to the second website and loading the preset webpage configuration information corresponding to the second website on the webpage view from which the private data has been cleared, the interfaces such as the webpage view and the webpage setting do not need to be repeatedly called, so that the specific configuration information of the webpage can be directly loaded, and the webpage loading efficiency on the light application, the webpage application or the hybrid application is improved.
In one embodiment, the second loading module 506 is configured to determine a target web site type of the second web site; acquiring preset webpage configuration information corresponding to a target website type; and loading preset network configuration information corresponding to the target website type on the webpage view from which the private data is cleared.
The web page loading device in this embodiment can store web addresses and web page configuration information in advance correspondingly because some configuration information of the same web address type is the same; the target website type of the second website is determined, preset webpage configuration information corresponding to the target website type is obtained, and the preset network configuration information corresponding to the target website type is loaded on the webpage view from which the private data is cleared, so that some general configuration information of a website of a certain type can be rapidly loaded, and the webpage loading efficiency is improved.
In one embodiment, the web page loading device further comprises a web view creation module. The network view creation module is used for starting an application program; preloading relevant processes of the webpage view and webpage view configuration information in a time period in an idle state after an application program is started; a web page view is created based on the relevant progress of the web page view and the web page view configuration information.
The webpage loading device in the embodiment initializes the webpage view, belongs to the most time-consuming link, consumes a great amount of time for creating a new webpage view each time, not only affects the loading speed, but also causes the application main process to be blocked, and affects the experience very much, and the relevant process of the webpage view and the webpage view configuration information are preloaded by starting the application program in the time period of being in an idle state after the application program is started; when the webpage view creation instruction is acquired, the webpage view is created based on the webpage view configuration information, so that the idle time after the application program is started can be fully utilized for loading the webpage view, and the loading efficiency of the webpage view is improved.
In one embodiment, the webpage loading device further comprises a configuration module. The configuration module is used for writing configuration information of the webpage view into a configuration resource pool of the webpage view through the application program component; when a modification instruction for the webpage view configuration information is detected, the webpage view configuration information in the configuration resource pool is modified based on the modification instruction, and the modified webpage view configuration information is obtained. The network view creation module is used for acquiring the modified webpage view configuration information from the configuration resource pool, and preloading relevant processes of the webpage view and the webpage view configuration information.
According to the webpage loading device, the application program component writes the webpage view configuration information into the configuration resource pool of the webpage view, even if a user can configure in advance, the configuration information in the configuration resource pool can be modified before new webpage view configuration information is loaded, a large amount of management codes are saved, and development is focused on design development of core business.
In one embodiment, the clearing module 504 is configured to clear non-generic service data corresponding to a first web address, data related to an instance of a web page view, and user login data entered on the first web page.
In the web page loading device in this embodiment, because some non-universal service data, data related to an instance of a web page view and user login data are not needed for the second web address in general, by clearing the non-universal service data corresponding to the first web address, the data related to the instance of the web page view and the user login data input on the first web page, the second web page corresponding to the second web address can be loaded on the web page view from which the private data has been cleared.
In one embodiment, the private data includes user login data. The clearing module 504 is configured to determine a security level of the first website; and when the security level is lower than the preset level, clearing the user login data input on the first webpage.
According to the webpage loading device, the safety grade of the first website is determined, when the safety grade is lower than the preset grade, the user login data input on the first webpage are cleared, and when the first website is not safe, the safety of the user login data can be guaranteed.
In one embodiment, the clearing module 504 is configured to save the user login data entered on the first web page when the security level is higher than a preset level.
In the webpage loading device in this embodiment, when the security level is higher than the preset level, the user login data input on the first webpage is saved, so that when the user opens the first webpage next time, the user does not need to input login data again, and the convenience of operation is improved.
The above-mentioned division of each module in the web page loading device is only used for illustration, and in other embodiments, the web page loading device may be divided into different modules as needed to complete all or part of the functions of the web page loading device.
For specific limitation of the webpage loading device, reference may be made to the limitation of the webpage loading method hereinabove, and the description thereof will not be repeated here. The above-mentioned various modules in the web page loading device may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
Fig. 6 is a schematic diagram of an internal structure of an electronic device in one embodiment. As shown in fig. 6, the electronic device includes a processor and a memory connected by a system bus. Wherein the processor is configured to provide computing and control capabilities to support operation of the entire electronic device. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program is executable by a processor for implementing an X-web page loading method provided in the following embodiments. The internal memory provides a cached operating environment for operating system computer programs in the non-volatile storage medium. The electronic device may be any terminal device such as a mobile phone, a tablet computer, a PDA (Personal digital assistant), a POS (Point of Sales), a car-mounted computer, and a wearable device.
The implementation of each module in the webpage loading device provided in the embodiment of the application can be in the form of a computer program. The computer program may run on a terminal or a server. Program modules of the computer program may be stored in the memory of the electronic device. Which when executed by a processor, performs the steps of the method described in the embodiments of the application.
The embodiment of the application also provides a computer readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform steps of a web page loading method.
A computer program product comprising instructions that, when run on a computer, cause the computer to perform a web page loading method.
Any reference to memory, storage, database, or other medium used in the present application may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (11)

1. A web page loading method, comprising:
Starting an application program; preloading relevant processes of the webpage view and webpage view configuration information in a time period in an idle state after the application program is started; creating a webpage view based on the related process of the webpage view and webpage view configuration information, and loading a first webpage corresponding to a first website in the created webpage view;
When a loading instruction for a second website is acquired from the first webpage, private data of the first website are cleared; the private data includes user login data, non-generic business data and data related to an instance of a web page view, and the clearing the private data of the first web site includes: clearing non-universal service data corresponding to the first website and data related to an instance of a webpage view; determining the security level of the first website; when the security level is lower than a preset level, clearing user login data input on the first webpage;
when the security level is higher than the preset level, saving user login data input on a first webpage;
the method for loading the second webpage corresponding to the second website on the webpage view from which the private data has been cleared comprises the following steps:
acquiring preset webpage configuration information corresponding to the second website; loading preset webpage configuration information corresponding to the second website on the webpage view from which the private data is cleared; and, a step of, in the first embodiment,
Determining a target website type of the second website; acquiring preset webpage configuration information corresponding to the target website type; and loading preset network configuration information corresponding to the target website type on the webpage view from which the private data is cleared.
2. The method of claim 1, wherein the second web address is a web address corresponding to a light application, a web application, or a hybrid application.
3. The method of claim 1, wherein preloading the web view related process and web view configuration information during the period of time that the application is idle after being launched comprises:
And calling a preloading interface to execute a relevant process for preloading the webpage view and the webpage view configuration information in a time period that the process is in an idle state after the application program is started.
4. The method of claim 2, wherein the light application is a download-free, search-and-play application; a web application refers to application software that operates on the internet or an intranet using a web browser.
5. The method according to claim 4, wherein the method further comprises:
writing the configuration information of the webpage view into a configuration resource pool of the webpage view through an application program component;
When a modification instruction for the webpage view configuration information is detected, modifying the webpage view configuration information in the configuration resource pool based on the modification instruction, and obtaining modified webpage view configuration information;
And acquiring the modified webpage view configuration information from the configuration resource pool, and executing the step of preloading the webpage view configuration information.
6. The method of claim 1, wherein the non-generic business data refers to data that is distinct from other web sites and that is not generic to other web sites.
7. The method of claim 2, wherein the preset web page configuration information refers to information for configuring a web page that is locally preconfigured.
8. The method of claim 2, wherein the hybrid application is a combination of a native application and a web application, and the native application is an application developed for an operating system.
9. A web page loading device, comprising:
The first loading module is used for starting an application program; preloading relevant processes of the webpage view and webpage view configuration information in a time period in an idle state after the application program is started; creating a webpage view based on the related process of the webpage view and webpage view configuration information, and loading a first webpage corresponding to a first website in the created webpage view;
The clearing module is used for clearing private data of the first website when a loading instruction for the second website is acquired from the first webpage; the private data includes user login data, non-generic business data and data related to an instance of a web page view, and the clearing the private data of the first web site includes: clearing non-universal service data corresponding to the first website and data related to an instance of a webpage view; determining the security level of the first website; when the security level is lower than a preset level, clearing user login data input on the first webpage;
The clearing module is further configured to save user login data input on the first web page when the security level is higher than the preset level;
The second loading module is configured to load a second web page corresponding to the second web address on the web page view from which the private data has been cleared, where the method includes: acquiring preset webpage configuration information corresponding to the second website; loading preset webpage configuration information corresponding to the second website on the webpage view from which the private data is cleared; and determining a target website type of the second website; acquiring preset webpage configuration information corresponding to the target website type; and loading preset network configuration information corresponding to the target website type on the webpage view from which the private data is cleared.
10. An electronic device comprising a memory and a processor, the memory having stored therein a computer program which, when executed by the processor, causes the processor to perform the steps of the web page loading method of any of claims 1 to 8.
11. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 8.
CN202011001582.7A 2020-09-22 2020-09-22 Webpage loading method, webpage loading device, electronic equipment and computer readable storage medium Active CN112163173B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011001582.7A CN112163173B (en) 2020-09-22 2020-09-22 Webpage loading method, webpage loading device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011001582.7A CN112163173B (en) 2020-09-22 2020-09-22 Webpage loading method, webpage loading device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112163173A CN112163173A (en) 2021-01-01
CN112163173B true CN112163173B (en) 2024-05-03

Family

ID=73862550

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011001582.7A Active CN112163173B (en) 2020-09-22 2020-09-22 Webpage loading method, webpage loading device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112163173B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114546390A (en) * 2022-04-26 2022-05-27 北京搜狐新动力信息技术有限公司 webView component management method and related device

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105426196A (en) * 2015-12-23 2016-03-23 小米科技有限责任公司 Implementation method and device of page animation and mobile terminal
CN105426538A (en) * 2015-12-21 2016-03-23 北京奇虎科技有限公司 Page switching method and device
CN105893095A (en) * 2016-04-13 2016-08-24 海尔优家智能科技(北京)有限公司 Webpage loading method and device
CN106250434A (en) * 2016-07-26 2016-12-21 东软集团股份有限公司 Load the method and device of webpage
CN107045546A (en) * 2017-03-31 2017-08-15 北京猎豹移动科技有限公司 A kind of web page processing method, device and intelligent terminal
CN107621955A (en) * 2017-09-25 2018-01-23 四川长虹电器股份有限公司 A kind of easy web app implementation method
CN109242977A (en) * 2018-08-06 2019-01-18 百度在线网络技术(北京)有限公司 Webpage rendering method, device and storage medium
CN109684575A (en) * 2018-10-30 2019-04-26 平安科技(深圳)有限公司 Processing method and processing device, storage medium, the computer equipment of web data
CN110020326A (en) * 2018-09-07 2019-07-16 天翼电子商务有限公司 A method of promoting Webview opening speed
CN110096663A (en) * 2019-03-18 2019-08-06 中国平安人寿保险股份有限公司 Page loading method, device, electronic equipment and computer readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9582811B2 (en) * 2013-09-25 2017-02-28 Apple Inc. Active time spent optimization and reporting
US11275565B2 (en) * 2018-11-21 2022-03-15 Kony, Inc. System and method for connecting end-users to business systems

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105426538A (en) * 2015-12-21 2016-03-23 北京奇虎科技有限公司 Page switching method and device
CN105426196A (en) * 2015-12-23 2016-03-23 小米科技有限责任公司 Implementation method and device of page animation and mobile terminal
CN105893095A (en) * 2016-04-13 2016-08-24 海尔优家智能科技(北京)有限公司 Webpage loading method and device
CN106250434A (en) * 2016-07-26 2016-12-21 东软集团股份有限公司 Load the method and device of webpage
CN107045546A (en) * 2017-03-31 2017-08-15 北京猎豹移动科技有限公司 A kind of web page processing method, device and intelligent terminal
CN107621955A (en) * 2017-09-25 2018-01-23 四川长虹电器股份有限公司 A kind of easy web app implementation method
CN109242977A (en) * 2018-08-06 2019-01-18 百度在线网络技术(北京)有限公司 Webpage rendering method, device and storage medium
CN110020326A (en) * 2018-09-07 2019-07-16 天翼电子商务有限公司 A method of promoting Webview opening speed
CN109684575A (en) * 2018-10-30 2019-04-26 平安科技(深圳)有限公司 Processing method and processing device, storage medium, the computer equipment of web data
CN110096663A (en) * 2019-03-18 2019-08-06 中国平安人寿保险股份有限公司 Page loading method, device, electronic equipment and computer readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
AppFlow: using machine learning to synthesize robust, reusable UI tests;Gang Hu 等;《ESEC/FSE 2018: Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering》;20181026;269–282 *
Hybrid模式系统框架的设计与应用;赵英军;《中国优秀硕士学位论文全文数据库 信息科技辑》;20180615(第06期);I138-618 *

Also Published As

Publication number Publication date
CN112163173A (en) 2021-01-01

Similar Documents

Publication Publication Date Title
CN108959455B (en) Single-page Web application implementation method and device, computer equipment and storage medium
CN108108219B (en) Application program running method and device, computer equipment and storage medium
CN110263275A (en) A kind of method, apparatus, mobile terminal and storage medium accessing webpage
CN104049986A (en) Plugin loading method and device
CN112114913B (en) Application program interface updating method and device, computer equipment and storage medium
CN110177039B (en) Message sharing method and device, computer equipment and storage medium
CN109413153B (en) Data crawling method and device, computer equipment and storage medium
CN107479868B (en) Interface loading method, device and equipment
CN111191158A (en) Webpage resource caching method and device, computer equipment and storage medium
CN110659092A (en) Webpage screenshot method and device, computer equipment and storage medium
CN109582890A (en) Page loading method, device, computer equipment and storage medium
CN112163173B (en) Webpage loading method, webpage loading device, electronic equipment and computer readable storage medium
CN112114808A (en) Page rendering method and device and electronic equipment
CN110119490A (en) Web browser method, device, computer equipment and storage medium
CN112667246A (en) Application function extension method and device and electronic equipment
CN111026988A (en) Page loading method, device and system and computer equipment
CN112667326A (en) Display method and device of popup page, computer equipment and storage medium
CN112433784A (en) Page loading method, device, equipment and storage medium
CN110324410B (en) Method, device, computer equipment and storage medium for initiating webpage request
CN110858238B (en) Data processing method and device
CN111880789A (en) Page rendering method, device, server and computer-readable storage medium
CN111177624B (en) Website front-end and back-end communication method, device, computer equipment and storage medium
CN111046308A (en) Page loading method and device
CN110442380B (en) Data preheating method and computing equipment
CN112084442A (en) Page loading method and device, electronic equipment and storage medium

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