CN112163173A - Webpage loading method and device, electronic equipment and computer readable storage medium - Google Patents
Webpage loading method and device, electronic equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN112163173A CN112163173A CN202011001582.7A CN202011001582A CN112163173A CN 112163173 A CN112163173 A CN 112163173A CN 202011001582 A CN202011001582 A CN 202011001582A CN 112163173 A CN112163173 A CN 112163173A
- Authority
- CN
- China
- Prior art keywords
- webpage
- website
- view
- loading
- configuration information
- 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.)
- Granted
Links
- 238000011068 loading method Methods 0.000 title claims abstract description 134
- 238000000034 method Methods 0.000 claims abstract description 59
- 230000008569 process Effects 0.000 claims description 32
- 230000004048 modification Effects 0.000 claims description 13
- 238000012986 modification Methods 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims description 12
- 238000010586 diagram Methods 0.000 description 10
- 238000011161 development Methods 0.000 description 7
- 230000001960 triggered effect Effects 0.000 description 5
- 238000013461 design Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000036316 preload Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing 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 the first website in the established webpage view; when a loading instruction for a second website is acquired on the first webpage, removing private data of the first website; and loading a second webpage corresponding to the second website on the webpage view from which the private data is removed. By adopting the method, the occupied memory can be reduced.
Description
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method and an apparatus for loading a web page view, an electronic device, and a computer-readable storage medium.
Background
In the current mobile internet era, web views (webviews) are widely used. The traditional method for loading the web page view 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 memory occupation.
Disclosure of Invention
The embodiment of the application provides a webpage loading method and device, electronic equipment and a computer readable storage medium, and the occupied memory can be reduced.
A webpage loading method comprises the following steps:
loading a first webpage corresponding to the first website in the established webpage view;
when a loading instruction for a second website is acquired on the first webpage, removing private data of the first website;
and loading a second webpage corresponding to the second website on the webpage view from which the private data is removed.
A web page loading apparatus comprising:
the first loading module is used for loading a first webpage corresponding to the first website in the established webpage view;
the clearing module is used for clearing the private data of the first website when a loading instruction of a second website is acquired on 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 removed.
An electronic device comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of:
loading a first webpage corresponding to the first website in the established webpage view;
when a loading instruction for a second website is acquired on the first webpage, removing private data of the first website;
and loading a second webpage corresponding to the second website on the webpage view from which the private data is removed.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
loading a first webpage corresponding to the first website in the established webpage view;
when a loading instruction for a second website is acquired on the first webpage, removing private data of the first website;
and loading a second webpage corresponding to the second website on the webpage view from which the private data is removed.
According to the webpage loading method, the webpage loading device, the electronic equipment and the computer readable storage medium, the first webpage corresponding to the first website is loaded in the established webpage view, when the loading instruction of the second website is acquired on the first webpage, the private data of the first website is removed, the second webpage corresponding to the second website is loaded on the webpage view with the removed 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, the multiplexing of the webpage view can be achieved, the conventional process flow of repeatedly establishing and destroying the webpage view and the using process flow of the webpage view is avoided, the operation of other tasks is not influenced, the performance of the electronic equipment and the occupation of a memory are reduced, the display speed of the webpage is increased, and the use of the webpage view is simplified.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow diagram of a method for loading a web page in one embodiment;
FIG. 2 is a diagram illustrating a timeline of a method for loading web pages in one embodiment;
FIG. 3 is a schematic diagram illustrating an architecture flow of a web page loading method according to an embodiment;
FIG. 4 is a flowchart illustrating a method for loading a web page in another embodiment;
FIG. 5 is a block diagram of a web page loading apparatus according to an embodiment;
fig. 6 is a schematic diagram of an internal structure of an electronic device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It is to be understood that the terms "first," "second," and the like as used herein may be used herein to describe various information, but the information is not limited by these terms. These terms are only used to distinguish one piece of information 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 present 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 diagram of a method for loading a web page in one embodiment. The web page loading method in this embodiment is described by taking the example of running on an electronic device. As shown in fig. 1, the web page loading method includes steps 101 to 106. Wherein:
and 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 a web page. The web address is used to represent the address of a web page. The website may specifically be a URL (uniform resource locator). The first web page refers to a page of a first web address.
Specifically, the electronic device creates a web page view. The electronic device can acquire a first website input by a user or a first website corresponding to a browser control triggered by the user on a browser application. 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.
And 104, when the loading instruction of the second website is acquired on the first webpage, removing the private data of the first website.
The private data (private data) of the first website refers to data that is not common between the first website and other websites. Private data may be, for example, user login data, non-generic business data, and data related to an instance of a web page view.
Specifically, the input second website address can be acquired in the website address input area of the first webpage. Or, by triggering the control on the first webpage, the electronic device obtains a loading instruction of the second website corresponding to the control. And when a loading instruction of the second website is acquired on the first webpage, the electronic equipment removes the private data of the first website.
And 106, loading a second webpage corresponding to the second website on the webpage view with the private data removed.
Specifically, the electronic device loads a second webpage corresponding to the second website on the webpage view from which the private data has been removed. Namely, the electronic device loads a second webpage corresponding to the second website on the same webpage view.
The web page loading method in this embodiment loads the first web page corresponding to the first website in the created web page view, when a loading instruction for a second website is acquired on a first webpage, the private data of the first website is cleared, a second webpage corresponding to the second website is loaded on the webpage view of which the private data is cleared, namely, the second website is triggered on the first webpage, the first website and the second website can share the same webpage view, the multiplexing of the webpage view can be achieved, the webpage switching experience below 10 milliseconds is provided, the conventional process of repeatedly creating and destroying the webpage view and the using process thereof is avoided, the operation of other tasks is not influenced, the performance of electronic equipment and the occupation of a memory are reduced, the display speed of the webpage is accelerated, and the use of the webpage view is simplified, the method is more friendly to developers, and the 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. Loading a second webpage corresponding to the second website on the webpage view with the private data removed, wherein the loading comprises the following steps: acquiring preset webpage configuration information corresponding to the second website; and loading preset webpage configuration information corresponding to the second website on the webpage view from which the private data is removed.
The Light APP (Light APP) is an application program that can be searched without downloading. A Web application (Web APP) is an application software that operates on the internet or an intranet using a Web browser. Hybrid App refers to a combination of native applications and web applications. Native applications refer to applications developed for some operating system. The preset webpage configuration information refers to some information which is configured in advance locally and is used for configuring the webpage. For example, the preset web page configuration information may be theme style configuration information, etc., without being limited thereto.
Specifically, a web address and corresponding web page configuration information are stored in an Application package (Application package) in a corresponding manner. And the electronic equipment reads the 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 removed. The electronic device may obtain 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 removed private data webpage view. The resource information is the content of the second website, and the resource information can be displayed on the 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 correspondingly stored, and the preset webpage configuration information corresponding to the second website is loaded on the webpage view from which the private data has been removed by acquiring the preset webpage configuration information corresponding to the second website, so that the specific configuration information of the webpage can be directly loaded without repeatedly calling interfaces such as the webpage view and the webpage setting, and the webpage loading efficiency in 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 removed includes: 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 removed.
In the browser, different websites can be classified, for example, into a video category, a news category, a map category, and the like. Some webpage configuration information corresponding to the same website type is the same or similar.
Specifically, the electronic device may store the website address and the corresponding website type locally. Or the electronic device may determine the target website type of the second website according to the second-level domain name or the third-level domain name of the website, 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 are removed. The electronic device may obtain resource information corresponding to the second website from the server, and load the resource information corresponding to the second website on the removed private data webpage view. The resource information is the content of the second website, and the resource information can be displayed on the second webpage corresponding to the second website.
In the webpage loading method in the embodiment, because some configuration information of the same website type is the same, the website and the webpage configuration information can be stored correspondingly in advance; and determining a target website type of the second website, acquiring preset webpage configuration information corresponding to the target website type, and loading the preset network configuration information corresponding to the target website type on the webpage view from which the private data is removed, so that some general configuration information of a certain type of website can be quickly loaded, and the webpage loading efficiency is improved.
In one embodiment, before loading the first web page corresponding to the first web address in the created web page view, the method includes: starting an application program; preloading a relevant process of a webpage view and webpage view configuration information in a time period of an idle state after an application program is started; and creating the webpage view based on the related process of the webpage view and the webpage view configuration information.
The application program refers to an application program capable of displaying a web page. The application may specifically be an android application. The application may be referred to as a browser, for example. 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 for initializing a web view, a network, a resource for acquiring a web view, general web view configuration information, and the like.
Specifically, the electronic device acquires a starting instruction for the application program, and starts the application program based on the starting instruction. And calling a preloading interface to execute a preloading (preload) webpage view related process and webpage view configuration information of a webpage view in a time period when the process is in an idle state after the application program is started. And creating the webpage view based on the related process of the webpage view and the webpage view configuration information.
Fig. 2 is a schematic diagram of a time axis of a webpage loading method in one embodiment. After the electronic equipment starts the application program, the electronic equipment is in an Idle state (Idle) time period, and relevant processes of the webpage view and webpage view configuration information are preloaded. The web view configuration information includes SO (Shared Object) files, a process for initializing a web view, a network environment, resources for acquiring a web view, general web view configuration information, and the like. And loading a 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 task scheduling gap of a main process, and the method is mainly used for starting a webpage view related process, initializing a network environment and the like before the user uses the webpage view, loading necessary resources, and presetting some common and business-unrelated configurations.
According to the webpage loading method in the embodiment, 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, the loading speed is influenced, the application main process is blocked, the experience is influenced greatly, and the relevant process of the webpage view and the configuration information of the webpage view are preloaded in the idle time period after the application program is started by starting the application program; when a webpage view creating instruction is acquired, the webpage view is created based on the webpage view configuration information, the webpage view can be loaded by fully utilizing the idle time after the application program is started, and the webpage view loading efficiency is improved.
In one embodiment, the web page loading method further includes: writing the webpage view configuration information into a configuration resource pool of the webpage view through an application program component; and 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 the modified webpage view configuration information. And acquiring the modified webpage view configuration information from the configuration resource pool, and executing the relevant process of the preloaded webpage view and the webpage view configuration information.
The Application component may be an APK (Application package). The configuration resource pool is used for storing configuration information of the webpage view.
Specifically, the electronic device writes the webpage view configuration information into a configuration resource pool corresponding to the webpage view through an application component. And 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 the modified webpage view configuration information. And in the time period of idle state 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 diagram of an architecture flow of a web page loading method in an embodiment is shown. The method comprises the following steps:
At step 304, the application component receives a web page view creation instruction.
In particular, the web page view provides an interface for external dynamic addition of reads and selections.
At step 310, the application component receives a web page view creation instruction.
In the webpage loading method in the embodiment, the webpage view configuration information is written into the configuration resource pool of the webpage view through the application program component, so that a user can configure the webpage view configuration information in advance and can modify the configuration information in the configuration resource pool before loading new webpage view configuration information, a large amount of management codes are saved, and development is focused on design and development of core services.
In one embodiment, clearing the private data of the first web address comprises: and clearing non-universal business data corresponding to the first web address, data related to the example of the web page view and user login data input on the first web page.
Specifically, the non-common service data, i.e. the data that the first website has a distinction from other websites, i.e. the service data is not common with other websites. The data associated with 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 username and password for the user to login to the website. The electronic equipment provides a private data clearing interface, calls the private data clearing interface to realize the function of recovering the webpage view initialization state, and clears the non-universal service data corresponding to the first website, data such as cache, navigation and historical records related to the webpage view example, user login data and the like. The interface is called before the second webpage corresponding to the second website is loaded, so that the time consumption for clearing data is short, and the use experience is not influenced.
In the webpage loading method in this embodiment, since some non-general service data, data related to the instance of the webpage view, and user login data are not needed in general, the second webpage corresponding to the second website can be loaded on the webpage view from which the private data has been removed by removing the non-general 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.
In one embodiment, the private data includes user login data. Clearing the private data of the first website, comprising: determining the 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.
Specifically, the security level is used to indicate a security degree. The higher the safety level, the better the safety; the lower the security level, the worse the security. And when the security level is lower than the preset level, the electronic equipment clears the user login data input on the first webpage.
In the webpage loading method in the embodiment, by determining the security level of the first website, when the security level is lower than the preset level, the user login data input on the first webpage is cleared, and when the first website is less secure, the security of the user login data can be guaranteed.
In one embodiment, the web page loading method further includes: and when the security level is higher than the preset level, saving the user login data input on the first webpage.
In the webpage loading method in the embodiment, when the security level is higher than the preset level, the user login data input on the first webpage are stored, and the login data do not need to be input again when the user opens the first webpage next time, so that the convenience of operation is improved.
In one embodiment, a web page loading method includes:
step a1, the application is started.
Step a2, preloading the relevant process of the web page view and the configuration information of the web page view in the idle state after the application program is started.
Step a3, writing the configuration information of the web page view into the configuration resource pool of the web page view through the application program component.
Step a4, when a modification instruction for the web view configuration information is detected, modifying the web view configuration information in the configuration resource pool based on the modification instruction, and obtaining the modified web view configuration information.
Step a5, obtaining the modified web page view configuration information from the configuration resource pool, and creating the web page view based on the web page view related process and the web page view configuration information.
Step a6, loading the first web page corresponding to the first web address in the created web page view.
Step a7, when a loading instruction for the second web address is obtained on the first web page and the security level of the first web address is lower than a preset level, removing the user login data input on the first web page.
Step a8, when the security level is higher than the preset level, saving the user login data inputted on the first webpage.
Step a9, removing the non-general service data corresponding to the first web address and the data related to the example of the web page view.
Step a10, acquiring preset web page configuration information corresponding to the second website.
Step a11, loading the preset web page configuration information corresponding to the second website on the web page view from which the private data has been removed.
The web page loading method in this embodiment loads the first web page corresponding to the first website in the created web page view, when a loading instruction for a second website is acquired on a first webpage, the private data of the first website is cleared, a second webpage corresponding to the second website is loaded on the webpage view of which the private data is cleared, namely, the second website is triggered on the first webpage, the first website and the second website can share the same webpage view, the multiplexing of the webpage view can be achieved, the webpage switching experience below 10 milliseconds is provided, the conventional process of repeatedly creating and destroying the webpage view and the using process thereof is avoided, the operation of other tasks is not influenced, the performance of electronic equipment and the occupation of a memory are reduced, the display speed of the webpage is accelerated, and the use of the webpage view is simplified, the method is more friendly to developers, and the user experience is improved.
In one embodiment, as shown in fig. 4, a flowchart of a method for loading a web page in another embodiment is shown. The electronic equipment initializes the webpage view and loads a first webpage corresponding to the first website. Initializing the web page view includes initializing a process (Init process), preparing an environment (preparation environment), and creating a new web page view. Loading the first web page corresponding to the first web address includes loading first web page configuration information. Configuration information such as uniform resource locators and web page configurations (Websettings). Clearing the private data corresponding to the first website includes clearing the non-general configuration information, the cache data corresponding to the first website, some other data in the browser database, and the like.
In the current mobile internet era, more and more web page applications appear on mobile terminal equipment, and web page views are widely applied, by using the method in the embodiment of the application, the starting speed of the web page can be accelerated by multiplexing the web page views, the memory and the central processing unit resources are saved, especially, the effect on low-end performance equipment is remarkable, the management difficulty of the web page views is reduced through the management of configuration, and developers can focus on the service design more conveniently, for example:
1) in the scene of multiple tab pages of the light application engine, the repeated starting of the webpage view when a new tab is opened every time is avoided, the time consumption of 300 plus 500ms can be saved, and when the webpage switching action occurs, the request and the display of the webpage resources are directly carried out, so that the effect of opening in second really is achieved.
2) In the browser, different website classifications, such as video classification and news classification, can be configured for websites with different security levels directly through the 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 services.
By the method in the embodiment of the application, the experience of the application can be improved on the hybrid application, the dependence on the performance of equipment is reduced, the second-turn-on effect is particularly facilitated on the application similar to a light application engine, a frame of the hybrid application of the webpage view can be created by expanding the scheme, page navigation, configuration and management of components or theme styles are integrated, and the mobile terminal application with excellent experience can be created while the development cost is greatly reduced.
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, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
Fig. 5 is a block diagram of a structure of a web page loading apparatus according to an embodiment. As shown in fig. 5, a web page loading apparatus includes a first loading module 502, a clearing module 504, and a second loading module 506, where:
a first loading module 502, configured to load a first web page corresponding to a first website in the created web page view;
a clearing module 504, configured to clear the private data of the first website when the loading instruction for the second website is obtained on the first webpage;
and a second loading module 506, configured to load a second web page corresponding to the second website on the web page view from which the private data has been removed.
The web page loading device in this embodiment loads the first web page corresponding to the first website in the created web page view, when a loading instruction for a second website is acquired on a first webpage, the private data of the first website is cleared, a second webpage corresponding to the second website is loaded on the webpage view of which the private data is cleared, namely, the second website is triggered on the first webpage, the first website and the second website can share the same webpage view, the multiplexing of the webpage view can be achieved, the webpage switching experience below 10 milliseconds is provided, the conventional process of repeatedly creating and destroying the webpage view and the using process thereof is avoided, the operation of other tasks is not influenced, the performance of electronic equipment and the occupation of a memory are reduced, the display speed of the webpage is accelerated, and the use of the webpage view is simplified, the method is more friendly to developers, and the 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 webpage configuration information corresponding to the second website; and loading preset webpage configuration information corresponding to the second website on the webpage view from which the private data is removed.
In the web page loading device in this embodiment, since the number of web addresses included in the light application, the web page application, or the hybrid application is limited, the web addresses and the corresponding web page configuration information can be correspondingly stored, and the preset web page configuration information corresponding to the second web address is loaded on the web page view from which the private data has been removed by acquiring the preset web page configuration information corresponding to the second web address, so that the specific configuration information of the web page can be directly loaded without repeatedly calling interfaces such as the web page view and the web page setting, and the web page loading efficiency in the light application, the web page application, or the hybrid application is improved.
In one embodiment, the second loading module 506 is configured to determine 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 removed.
In the webpage loading device in the embodiment, because some configuration information of the same website type is the same, the website and the webpage configuration information can be stored correspondingly in advance; and determining a target website type of the second website, acquiring preset webpage configuration information corresponding to the target website type, and loading the preset network configuration information corresponding to the target website type on the webpage view from which the private data is removed, so that some general configuration information of a certain type of website can be quickly loaded, and the webpage loading efficiency is improved.
In one embodiment, the web page loading apparatus further includes a web view creation module. The network view creating module is used for starting an application program; preloading a relevant process of a webpage view and webpage view configuration information in a time period of an idle state after an application program is started; and creating the webpage view based on the related process of the webpage view and the webpage view configuration information.
In the webpage loading device in the embodiment, initializing 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, the loading speed is influenced, the application main process is blocked, the experience is influenced greatly, and by starting the application program, the relevant process of the webpage view and the configuration information of the webpage view are preloaded in the time period of the idle state after the application program is started; when a webpage view creating instruction is acquired, the webpage view is created based on the webpage view configuration information, the webpage view can be loaded by fully utilizing the idle time after the application program is started, and the webpage view loading efficiency is improved.
In one embodiment, the web page loading device further comprises a configuration module. The configuration module is used for writing the configuration information of the webpage view into a configuration resource pool of the webpage view through the application program component; and 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 the modified webpage view configuration information. The network view creating module is used for acquiring the modified webpage view configuration information from the configuration resource pool, and preloading the webpage view related process and the webpage view configuration information.
In the web page loading apparatus in this embodiment, the application component writes the web page view configuration information into the configuration resource pool of the web page view, that is, the user may configure in advance, and may modify the configuration information in the configuration resource pool before loading new web page view configuration information, so that a large amount of management codes are saved, and development is more focused on design and development of core services.
In one embodiment, the clearing module 504 is configured to clear non-generic traffic data corresponding to the first web address, data associated with an instance of the web page view, and user login data entered on the first web page.
In the web page loading apparatus in this embodiment, since some non-general service data, data related to an instance of the web page view, and user login data are not required in general, 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 removed by removing the non-general 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.
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.
The webpage loading device in the embodiment determines the security level of the first website, and when the security level is lower than a preset level, clears the user login data input on the first webpage, so that the security of the user login data can be guaranteed when the first website is not secure.
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 above a preset level.
In the web page loading device in this embodiment, when the security level is higher than the preset level, the user login data input on the first web page is saved, and when the user opens the first web page next time, the login data does not need to be input again, so that convenience in operation is improved.
The division of each module in the web page loading apparatus is merely for illustration, and in other embodiments, the web page loading apparatus may be divided into different modules as needed to complete all or part of the functions of the web page loading apparatus.
For specific limitations of the web page loading apparatus, reference may be made to the above limitations of the web page loading method, which is not described herein again. The modules in the web page loading device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the 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 used for providing calculation and control capability and supporting the operation of the whole electronic equipment. 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 can be executed by a processor to implement an X web page loading method provided in the following embodiments. The internal memory provides a cached execution environment for the 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 Point of Sales (POS), a vehicle-mounted computer, and a wearable device.
The implementation of each module in the web page loading apparatus provided in the embodiment of the present application may be in the form of a computer program. The computer program may be run on a terminal or a server. Program modules constituted by such computer programs may be stored on the memory of the electronic device. Which when executed by a processor, performs the steps of the method described in the embodiments of the present 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 the steps of a web page loading method.
A computer program product containing instructions which, 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 herein may include non-volatile and/or volatile memory. Non-volatile 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), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (11)
1. A webpage loading method is characterized by comprising the following steps:
loading a first webpage corresponding to the first website in the established webpage view;
when a loading instruction for a second website is acquired on the first webpage, removing private data of the first website;
and loading a second webpage corresponding to the second website on the webpage view from which the private data is removed.
2. The method of claim 1, wherein the second website is a website corresponding to a light application, a web application, or a hybrid application;
the loading the second webpage corresponding to the second website on the webpage view from which the private data is removed includes:
acquiring preset webpage configuration information corresponding to the second website;
and loading preset webpage configuration information corresponding to the second website on the webpage view from which the private data is removed.
3. The method of claim 1, wherein loading a second web page corresponding to the second web address on the web page view with the private data removed comprises:
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 removed.
4. The method according to any one of claims 1 to 3, wherein before loading the first web page corresponding to the first web address in the created web page view, the method comprises:
starting an application program;
preloading a relevant process of a webpage view and webpage view configuration information in a time period of an idle state after the application program is started;
and creating the webpage view based on the related process of the webpage view and the webpage view configuration information.
5. The method of claim 4, further comprising:
writing the webpage view configuration information 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 to obtain the 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 clearing the private data of the first web address comprises:
and clearing the non-universal business 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.
7. The method of claim 1, wherein the private data comprises user login data;
the clearing of the private data of the first website comprises:
determining the security level of the first website;
and when the security level is lower than a preset level, clearing the user login data input on the first webpage.
8. The method of claim 7, further comprising:
and when the security level is higher than the preset level, saving the user login data input on the first webpage.
9. A web page loading apparatus, comprising:
the first loading module is used for loading a first webpage corresponding to the first website in the established webpage view;
the clearing module is used for clearing the private data of the first website when a loading instruction of a second website is acquired on 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 removed.
10. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program, wherein the computer program, when executed by the processor, causes the processor to perform the steps of the web page loading method according to any one of claims 1 to 8.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 8.
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 true CN112163173A (en) | 2021-01-01 |
CN112163173B 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) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114546390A (en) * | 2022-04-26 | 2022-05-27 | 北京搜狐新动力信息技术有限公司 | webView component management method and related device |
Citations (12)
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 |
US20170132657A1 (en) * | 2013-09-25 | 2017-05-11 | Apple Inc. | Active time spent optimization and reporting |
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 |
US20200159498A1 (en) * | 2018-11-21 | 2020-05-21 | Kony Inc. | Intelligent digital experience development platform (idxdp) |
-
2020
- 2020-09-22 CN CN202011001582.7A patent/CN112163173B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170132657A1 (en) * | 2013-09-25 | 2017-05-11 | Apple Inc. | Active time spent optimization and reporting |
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 |
US20200159498A1 (en) * | 2018-11-21 | 2020-05-21 | Kony Inc. | Intelligent digital experience development platform (idxdp) |
CN110096663A (en) * | 2019-03-18 | 2019-08-06 | 中国平安人寿保险股份有限公司 | Page loading method, device, electronic equipment and computer readable storage medium |
Non-Patent Citations (2)
Title |
---|
GANG HU 等: "AppFlow: using machine learning to synthesize robust, reusable UI tests", 《ESEC/FSE 2018: PROCEEDINGS OF THE 2018 26TH ACM JOINT MEETING ON EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING》, 26 October 2018 (2018-10-26), pages 269, XP055827740, DOI: 10.1145/3236024.3236055 * |
赵英军: "Hybrid模式系统框架的设计与应用", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 06, 15 June 2018 (2018-06-15), pages 138 - 618 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114546390A (en) * | 2022-04-26 | 2022-05-27 | 北京搜狐新动力信息技术有限公司 | webView component management method and related device |
Also Published As
Publication number | Publication date |
---|---|
CN112163173B (en) | 2024-05-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109582899B (en) | Page loading method and device, computer equipment and storage medium | |
CN108959455B (en) | Single-page Web application implementation method and device, computer equipment and storage medium | |
EP2948846A1 (en) | Resource calling for hybrid applications | |
CN109413153B (en) | Data crawling method and device, computer equipment and storage medium | |
CN108108219B (en) | Application program running method and device, computer equipment and storage medium | |
CN110659092B (en) | Webpage screenshot method and device, computer equipment and storage medium | |
CN110177039B (en) | Message sharing method and device, computer equipment and storage medium | |
CN107479868B (en) | Interface loading method, device and equipment | |
CN111026988A (en) | Page loading method, device and system and computer equipment | |
CN115098098A (en) | Page generation method, page display method and device | |
CN111191158A (en) | Webpage resource caching method and device, computer equipment and storage medium | |
CN112258295B (en) | Recording processing method, device and equipment | |
CN111552535A (en) | Interface picture replacing method and device, computer equipment and storage medium | |
CN115357834A (en) | Page jump method, device, equipment and storage medium | |
CN112163173B (en) | Webpage loading method, webpage loading device, electronic equipment and computer readable storage medium | |
CN112015378A (en) | Skeleton screen page generation method and device, computer equipment and storage medium | |
CN114265976A (en) | H5 page loading method, device, equipment and medium based on intelligent recommendation technology | |
CN110324410B (en) | Method, device, computer equipment and storage medium for initiating webpage request | |
CN113032078A (en) | Page display method and device, electronic equipment and computer readable storage medium | |
CN111258676B (en) | Module preloading method, device, equipment and readable storage medium | |
CN112433784A (en) | Page loading method, device, equipment and storage medium | |
CN110858238B (en) | Data processing method and device | |
CN111177624B (en) | Website front-end and back-end communication method, device, computer equipment and storage medium | |
CN113326080B (en) | H5 page loading method, device, equipment and storage medium | |
CN115756222A (en) | Application program skin changing method and device, computer 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 |