CN109582890A - Page loading method, device, computer equipment and storage medium - Google Patents

Page loading method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN109582890A
CN109582890A CN201811250183.7A CN201811250183A CN109582890A CN 109582890 A CN109582890 A CN 109582890A CN 201811250183 A CN201811250183 A CN 201811250183A CN 109582890 A CN109582890 A CN 109582890A
Authority
CN
China
Prior art keywords
page
load
load information
asynchronous
synchronous
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
Application number
CN201811250183.7A
Other languages
Chinese (zh)
Other versions
CN109582890B (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811250183.7A priority Critical patent/CN109582890B/en
Publication of CN109582890A publication Critical patent/CN109582890A/en
Application granted granted Critical
Publication of CN109582890B publication Critical patent/CN109582890B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of page loading method, device, terminal device and storage mediums, which comprises obtains the access request that client is sent, which includes load instruction;It obtains load and instructs corresponding load information list, wherein load information list includes synchronous load information and asynchronous load information;Load instruction is executed, load is obtained and instructs the corresponding initialization page;Using the mode loading synchronous load information of synchronous load in the initialization page, synchronous load information is shown on the initialization page, synchronization page is obtained;When synchronous loading page load completion, asynchronous load information is loaded using the mode of asynchronous load, asynchronous load information is shown in synchronization page, target pages are obtained.Page loading efficiency can be improved by the above method.

Description

Page loading method, device, computer equipment and storage medium
Technical field
The present invention relates to field of computer technology more particularly to a kind of page loading method, device, computer equipment and deposit Storage media.
Background technique
With the continuous development of Internet technology, more and more vdiverse in function, page systems that framework is complicated are on the market Occur.Traditional page loading method is to begin to loading page in page initial phase, is then carried out in display interface Display.For example, the business personnel of insurance company goes out list, listing system is opened, when the page initializes, load data are more, show speed It is very slow, it needs to wait for a long time, consumes the waiting time of user.Then, the page in system is frequently not self-existent, respectively There are corresponding dependence between a page, it is all that above-mentioned page loading method requires the page just to complete in initial phase The load of the page, but most of page therein be without using, cause the loading velocity of the page very slow, and page load effect Rate is lower.
Summary of the invention
The embodiment of the present invention provides a kind of page loading method, device, computer equipment and storage medium to solve the page The not high problem of loading efficiency.
A kind of page loading method, comprising:
The access request that client is sent is obtained, the access request includes load instruction;
It obtains the load and instructs corresponding load information list, wherein the load information list includes synchronous load Information and asynchronous load information;
The load instruction is executed, the load is obtained and instructs the corresponding initialization page;
The synchronous load information is loaded using the mode of synchronous load in the initialization page, by the synchronous load letter Breath is shown on the initialization page, obtains synchronization page;
When the synchronization page load complete, initialization the page in using asynchronous load mode load it is described it is asynchronous plus Information carrying breath, the asynchronous load information is shown in the synchronization page, target pages are obtained.
A kind of page loading device, comprising:
Access request obtains module, and for obtaining the access request of client transmission, the access request includes that load refers to It enables;
Load information list obtains module, instructs corresponding load information list for obtaining the load, wherein described Load information list includes synchronous load information and asynchronous load information;
Page acquisition module is initialized, for executing the load instruction, the load is obtained and instructs corresponding initialization The page;
Synchronization page loading module, for loading the synchronous load using the mode of synchronous load in the initialization page The synchronous load information is shown on the initialization page, obtains synchronization page by information;
Target pages loading module is completed for working as synchronization page load, is added in the initialization page using asynchronous The mode of load loads the asynchronous load information, and the asynchronous load information is shown in the synchronization page, target is obtained The page.
A kind of computer equipment, including memory, processor and storage are in the memory and can be in the processing The computer program run on device, the processor realize the step of the above-mentioned page loading method when executing the computer program Suddenly.
A kind of computer readable storage medium, the computer-readable recording medium storage have computer program, the meter The step of calculation machine program realizes the above-mentioned page loading method when being executed by processor.
In above-mentioned page loading method, device, computer equipment and storage medium, the access of acquisition client transmission first Request.Then it obtains load and instructs corresponding load information list.Then, execute load instruction, obtain initialization the page, and It initializes on the page using the mode loading synchronous load information of synchronous load, synchronous load information is shown in the initialization page On, synchronization page is obtained, so as to preferentially show the corresponding page of synchronizing information.Finally, being added using the mode of asynchronous load Asynchronous load information is carried, asynchronous load information is shown in synchronization page, target pages are obtained.Since synchronization page is completely opened up Synchronous load information is shown, and asynchronous load information is shown on target pages on demand, realizes on-demand loading, so that the page Response speed is accelerated.It to which target pages completely illustrate page load information, and then improves the page and adds efficiency, optimize page Face loading procedure presents preferable page effect, improves user experience.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present invention Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention Example, for those of ordinary skill in the art, without any creative labor, can also be according to these attached drawings Obtain other attached drawings.
Fig. 1 is the application environment schematic diagram of page loading method provided in an embodiment of the present invention;
Fig. 2 is one exemplary diagram of page loading method provided in an embodiment of the present invention;
Fig. 3 is another exemplary diagram of page loading method provided in an embodiment of the present invention;
Fig. 4 is another exemplary diagram of page loading method provided in an embodiment of the present invention;
Fig. 5 is another exemplary diagram of page loading method provided in an embodiment of the present invention;
Fig. 6 is another exemplary diagram of page loading method provided in an embodiment of the present invention;
Fig. 7 is a functional block diagram of page loading device provided in an embodiment of the present invention;
Fig. 8 is another functional block diagram of page loading device provided in an embodiment of the present invention;
Fig. 9 is another functional block diagram of page loading device provided in an embodiment of the present invention;
Figure 10 is a schematic diagram of computer equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
Page loading method provided by the present application, can be applicable in the application environment such as Fig. 1, wherein client passes through net Network is communicated with server-side, then the access request that server-side reception client is sent obtains load and instructs corresponding add Information list is carried, load instruction is executed, obtains the initialization page.And it is loaded together in the initialization page using the mode of synchronous load Load information is walked, synchronous load information is shown on the initialization page, synchronization page is obtained.And then use the side of asynchronous load Formula loads the asynchronous load information and obtains target pages so that asynchronous load information is shown in synchronization page.Wherein, Client can be, but not limited to be various personal computers, laptop, smart phone, tablet computer and portable wearable Equipment.Server-side can be realized with the server cluster of the either multiple server compositions of independent server.
In one embodiment, as shown in Fig. 2, being applied to be illustrated for the server-side in Fig. 1 in this way, including Following steps:
S10: obtaining the access request that client is sent, and access request includes load instruction.
Wherein, access request is the request to access to page info that client is sent to server-side.Specifically, may be used Think that client triggers the access request by predetermined action, such as by clicking predetermined key or input predetermined instruction come real Existing, for client when detecting or recognizing the corresponding instruction of above-mentioned movement, triggering generates access request, and the access request is sent out It is sent to server-side, server-side gets the access request.Access request include load instruction, the load instruction refer to client to The instruction that accession page is loaded that server-side is sent.
In a specific embodiment, the business personnel of insurance company needs to carry out out single operation on insurance system, first First need to access the declaration form page of insurance system, therefore, business personnel can be on the interface of declaration form system by clicking control (such as Button) mode send the access request of the access declaration form page, the load instruction for including in the access request, is client root According to single operation out, this condition triggers generation on the client.
S20: it obtains load and instructs corresponding load information list, wherein load information list includes synchronous load information With asynchronous load information.
Wherein, load information list refers to that each load instructs the list of corresponding load information composition, and load information is The need page info to be loaded that server-side is generated according to the load instruction of client.It is to be appreciated that each load instruction pair At least one page info of the load information answered.For example, load instruction initially dissolves single page initially to dissolve single-page information The load in face instructs corresponding load information to have customer information loading page information, channel information loading page information, target letter Cease the loading pages information such as loading page information and payment loading page information.
Wherein, synchronous load information refers to the information of the default significance level of the satisfaction of the page in client, asynchronous load letter Breath refers to the information for being unsatisfactory for default significance level of the page in client.Wherein, presetting significance level is preset use In the critical value for judging page info significance level.The default significance level can specifically be selected according to the needs of practical application It selects, herein with no restrictions.For example, a customer terminal webpage is that declaration form goes out single-page, it is possible to understand that ground, which, which goes out in single-page, relates to And go out single-page to the information such as declaration form number, insurance kind and mechanism and declaration form and be closely related, meet default significance level, therefore the guarantor It is related to the information such as declaration form number, insurance kind and mechanism in single single-page out, as synchronous load information.Simultaneously declaration form system go out It is also possible to that some bulletins of single machine structure out can be loaded in single-page or the marginal position of the page also will pop up advertisement page information Etc. the information for being unsatisfactory for default significance level, as asynchronous load information.
It should be noted that each load in the present embodiment instructs a corresponding load information list, a load letter Breath list corresponds to multiple load informations, and each load information is that synchronous load information or asynchronous load information can be according to default weights Degree is wanted to determine.Load information list can be configuring load information in a manner of caching.
S30: executing load instruction, obtains load and instructs the corresponding initialization page.
Wherein, the initialization page refers to the complete page with load instructions match.Specifically, by js jquery Initialization function init () function obtains the initialization page, wherein init () function is executed after current web page loads The function of initial method obtains load and instructs the corresponding initialization page.By getting the corresponding initialization page of instruction, So that the subsequent load information in the initialization page loads, the efficient load of information is realized.
S40: using the mode loading synchronous load information of synchronous load in the initialization page, synchronous load information is shown Show on the initialization page, obtains synchronization page.
Wherein, the mode of synchronous load refers to that the load of page info is synchronous mode, also known as blocking model, specifically, It is literary when being resolved to load js corresponding with synchronous load information during the browser resolves load information list of server-side When the code of part, suspends the parsing to the file quoted on the corresponding page of synchronous load information, execute load js file Code, pending file downloading then proceed to document analysis when the code in pending file executes completion.It is to be appreciated that synchronous The mode of load can prevent server-side from stopped subsequent document analysis, therefore, together to the subsequent processing of synchronous load information The mode of step load stopped subsequent file load (such as image), rendering or code and execute.So as to preferentially show synchronization The corresponding page of load information.
Wherein, synchronization page refers to the corresponding page of synchronizing information, for completely showing the page of necessary information.Continue It is in this step due to initially dissolving single-page by taking " load instruction dissolves single-page to be initial " in step S20 as an example " synchronization page ", the load for initially dissolving single-page instruct corresponding load information to have customer information loading page information, canal The loading pages information such as road information loading page information, target information loading page information and payment page info can completely be shown Show in synchronization page.To optimize the reading speed of the page, page request number is reduced, the load of page info is improved Efficiency.
S50: completing when synchronization page loads, and loads asynchronous load using the mode of asynchronous load in the initialization page and believes Breath, asynchronous load information is shown in synchronization page, target pages are obtained.
Wherein, the mode of asynchronous load refers to that the load of page info is asynchronous mode, also known as non-blocking mode.Specifically Ground, during the browser resolves load information list of server-side, when being resolved to load corresponding with asynchronous load information When the code of js file, document analysis corresponding to asynchronous load information executes the code of load js file, then proceedes to pair This document parsing, is not to wait for the downloading of file.Since the mode of asynchronous load is to continue to execute subsequent and asynchronous load on one side to believe The code of corresponding js file is ceased, a thread is additionally opened on one side and executes script corresponding with asynchronous load information, browser exists Downloading also will continue to carry out the loading processing of subsequent page while executing the code of js file, render to avoid obstruction interface, So as to shorten the whole load time of asynchronous load information.Asynchronous loading method can be based on the different of Script Element Step load is realized asynchronous load by DOM structure parsing after dynamic addition script label, is also possible to be loaded based on AJAX The asynchronous load of JS file can also be the asynchronous load of compatible encapsulation.
Wherein, target pages refer to that completely display is corresponding with asynchronous load information in " synchronization page " in step s 40 The page.Specifically, it is completed when synchronization page loads, it is corresponding to asynchronous load information in synchronization page in the initialization page The page on shown so that synchronous load information and the corresponding page of asynchronous load information are completely shown On target pages.It is to be appreciated that synchronization page completely illustrates synchronous load information, and asynchronous load information can be avoided Block page rendering, is shown on target pages according to the demand of load instruction, on-demand loading is realized, so that page response is fast Degree is accelerated.It to which target pages completely illustrate page load information, and then improves the page and adds efficiency, optimize page load Process presents preferable page effect, improves user experience.
In a specific embodiment, single-page is gone out for declaration form system, when load instruction is click employee's certificate class When the combobox of type, which instructs corresponding loading page information to have the information such as " continent identity card ", " army's testimony of a witness ", wherein Employee's type of credential page is asynchronous load information, and " continent identity card ", " army's testimony of a witness " corresponding combobox option use It is the mode of asynchronous load, which is shown on target pages, so that page info is efficiently loaded.
In the present embodiment, the access request that client is sent is obtained first.Then it obtains load and instructs corresponding load letter Cease list.Then, load instruction is executed, obtains the initialization page, and add on the initialization page using the mode of synchronous load Synchronous load information is carried, synchronous load information is shown on the initialization page, synchronization page is obtained, so as to preferentially show The corresponding page of synchronizing information.Finally, loading asynchronous load information using the mode of asynchronous load, asynchronous load information is shown In synchronization page, target pages are obtained.Since synchronization page completely illustrates synchronous load information, and asynchronous load information It shows on target pages on demand, realizes on-demand loading, so that page response speed is accelerated.To which target pages are completely shown Page load information, and then improve the page and add efficiency, page loading procedure is optimized, preferable page effect is presented, Improve user experience.
In one embodiment, it in step S20, obtains load and instructs corresponding load information list, specifically include following step It is rapid:
S21: load load instructs the corresponding initialization page, obtains original js script.
Wherein, original js script is the JavaScript language script obtained after loading to the initialization page, is used for Standard as the load information configuration loading method to the initialization page.For example, going out in single-page at one, pulled down when clicking When frame " area ", the initialization page in " area ", such as " Beijing ", " Tianjin ", " Hubei " and " Guangdong " original js foot can be loaded This.It is to be appreciated that due to including multiple original js scripts on the initialization page in " area ", according to synchronous loading method, The load time will necessarily be extended.Accordingly, it is determined that the loading method of the initialization page is asynchronous loading method.
S22: it using the load original js script of cached configuration, obtains load and instructs corresponding load information list.Wherein, add Caching is carried between application program and permanent data store source, for reducing application program direct read/write permanent data store source Frequency, to improve runnability.Specifically in the data that please be look for novelty to server, in the accession page of client, directly The content using caching is connect, the page is operated, to reduce the time for obtaining data from server, user is reduced and waits Time enhances user experience.
Specifically, loading page is configured in the way of load caching, concrete configuration is as follows: to original js foot This loading method is configured, the mode of such as synchronous loading method or asynchronous load.It i.e. will by the caching of load information The information of the js script of synchronous load and asynchronous load is needed to be configured, when accession page, the element for initializing the page is needed It completely to load, be determined as the mode of synchronous load.And when operational controls, it needs to guarantee the order of elements load of control, determines For the mode of asynchronous load.By configuring original js script, to more efficiently utilize load information list, the load of the page Mode is more clear, and also facilitates follow-up maintenance.
In the present embodiment, the load initialization page obtains original js script.Using load the original js script of cached configuration, It obtains load and instructs corresponding load information list, by configuring original js script, to more efficiently utilize load information The loading method of list, the page is more clear, and also facilitates follow-up maintenance.
In one embodiment, it as shown in figure 4, in step S40, is loaded in the initialization page using the mode of synchronous load Synchronous load information is shown on the initialization page, obtains synchronization page, specifically comprise the following steps: by synchronous load information
S41: the title for synchronizing the corresponding js script of load information is obtained.
Wherein, the title of js script refers to the title for identifying js script, it is possible to understand that ground, every js script corresponding one Title.Specifically, the corresponding js script of the synchronous load information of tool filename () acquisition can be obtained by file name Title.
S42: according to the path of the synchronous load information of the name acquiring of js script.
Wherein, path (path) refers to the address of storage load information list.In the present embodiment, the road of synchronous load information Diameter refers to the position for storing synchronous load information.Specifically, after the title that the corresponding js script of synchronous load information has been determined, The name of js script is referred to as keyword, the path of synchronous load information is obtained by the way of inquiry, so that subsequent basis should Path is rapidly and accurately further processed synchronous load information.
S43: if obtaining the path success of synchronous load information, the Rendering operations of current page, and load path are terminated In synchronization load information, synchronous load information show on initializing the page, synchronization page is obtained.
Wherein, Rendering operations refer to the operation that the element to the predetermined position of current page is downloaded.Specifically, when obtaining When getting the path of synchronous load information, synchronous load information can be loaded, and therefore, stop the Rendering operations of current page, And synchronous load information is loaded, that is, realizes the mode of synchronous load.It is to be appreciated that due to being the mode blocked Under, server-side can stop the Rendering operations of current page, that is, stop the downloading to the element in page predetermined position, so that together Step load information is completely shown on the page, i.e., in synchronization page.And then the speed of synchronous load information load is accelerated, so that Synchronous load information is preferably displaying in synchronization page.
In the present embodiment, the title for synchronizing the corresponding js script of load information is obtained first.Then according to the name of js script Claim the path for obtaining synchronous load information, so as to subsequent rapidly and accurately further to synchronous load information progress according to the path Processing.Finally, terminating the Rendering operations of current page, and in load path if obtaining the path success of synchronous load information Synchronization load information, synchronous load information is shown on the page, obtains synchronization page, and then accelerate synchronous load information The speed of load, so that synchronous load information is preferably displaying in synchronization page.
In one embodiment, it as shown in figure 5, in step S50, completes when synchronization page loads, makes in the initialization page Asynchronous load information is loaded with the mode of asynchronous load, asynchronous load information is shown in synchronization page, target pages are obtained, Specifically comprise the following steps:
S51: preset script element is obtained.
Wherein, preset script element refers to preset client script element.For being belonged to by addition async Property or defer attribute make the corresponding js script of asynchronous load information that need not synchronize execution.Specifically, the present embodiment is by obtaining Preset script element is taken, is conducive to subsequently through preset script element js script corresponding to asynchronous load information Efficiently executed.
S52: preset script element is inserted into the corresponding DOM Document Object Model structure of asynchronous load information, is obtained The asynchronous js script of asynchronous load information.
Wherein, asynchronous js script refers to default by being inserted into the corresponding DOM Document Object Model structure of asynchronous load information Script element after obtained js script.
Wherein, DOM Document Object Model (abbreviation DOM) structure refers to the tree structure of the document of page load information, tool Body, preset script element is inserted into the corresponding DOM structure of asynchronous load information, asynchronous js script has been obtained, from And the downloading js code of non-obstruction is realized, and then the page elements for carrying out asynchronous load information to asynchronous js script load, resistance The initialization process of the plug portion page.
S53: asynchronous js script is executed, asynchronous load information is shown in synchronization page, target pages are obtained.
Specifically, asynchronous js script is executed, i.e., the page elements for carrying out asynchronous load information to asynchronous js script load, right In the initialization process of the obstruction page, so that the page elements for carrying out asynchronous load information to asynchronous js script load, make It obtains asynchronous load information to be shown in synchronization page, obtains target pages, which completely illustrates page load information, Improve page loading efficiency.
In the present embodiment, preset script element is obtained first.Then preset script element is inserted into asynchronous In the corresponding document object model structure of load information, the asynchronous js script of asynchronous load information is obtained, thus to asynchronous js foot Originally the load of obstruction page elements, the initialization process of the obstruction page are taken place without.Finally, asynchronous js script is executed, it will Asynchronous load information is shown in synchronization page, obtains target pages, for the initialization process of the obstruction page, to make It obtains asynchronous load information to be shown in synchronization page, obtains target pages.The target pages completely illustrate page load information, Improve page loading efficiency.
In one embodiment, it as shown in fig. 6, in step S50, completes when synchronization page loads, makes in the initialization page Asynchronous load information is loaded with the mode of asynchronous load, asynchronous load information is shown in synchronization page, target pages are obtained, Specifically comprise the following steps:
S51 ': the corresponding js script of asynchronous load information is obtained using AJAX.
Wherein, AJAX is a kind of without capableing of update section subnetting page information in the case where reloading entire webpage Technology.In the present embodiment, AJAX is for obtaining the corresponding js script of asynchronous load information, it is possible to understand that ground, since AJAX is not necessarily to The initialization page is reloaded, the corresponding js script of asynchronous load information is directly acquired, it is corresponding to improve asynchronous load information The acquisition speed of js script.
S52 ': the corresponding js script of asynchronous load information is run by script execution tool, asynchronous load information is shown In synchronization page, target pages are obtained.
Specifically, which can be eval tool, be a kind of work for executing text string generation sentence Tool, specifically, the corresponding js script of asynchronous load information is run by script execution tool, accelerate js script executes speed Degree, improves the efficiency of asynchronous loading method.
Specifically, the corresponding js script of asynchronous load information is run by script execution tool, so that asynchronous load information It is shown in synchronization page, obtains target pages.So that target pages completely illustrate page info, page load effect is improved Rate.
In the present embodiment, the corresponding js script of asynchronous load information is obtained by using AJAX, improves asynchronous load letter Cease the acquisition speed of corresponding js script.And the corresponding js script of asynchronous load information is run by script execution tool, it will be different Step load information is shown in synchronization page, obtains target pages.So that target pages completely illustrate page info, improve Page loading efficiency.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
In one embodiment, a kind of page loading device is provided, which adds with the page in above-described embodiment Support method corresponds.As shown in fig. 7, the page loading device includes that access request obtains module 10, load information list obtains Modulus block 20, initialization page acquisition module 30, synchronization page loading module 40 and target pages loading module 50.Each function mould Detailed description are as follows for block:
Access request obtains module 10, and for obtaining the access request of client transmission, access request includes load instruction;
Load information list obtains module 20, instructs corresponding load information list for obtaining load, wherein load letter Ceasing list includes synchronous load information and asynchronous load information;
Page acquisition module 30 is initialized, for executing the load instruction, it is corresponding initial to obtain the load instruction Change the page;
Synchronization page loading module 40, for loading letter using the mode loading synchronous of synchronous load in the initialization page Synchronous load information is shown on the initialization page, obtains synchronization page by breath;
Target pages loading module 50 uses asynchronous load in the initialization page for completing when synchronization page load Mode load asynchronous load information, asynchronous load information is shown in synchronization page, target pages are obtained.
Preferably, as shown in figure 8, it includes original js script acquiring unit 21 and load that load information list, which obtains module 20, Information list acquiring unit 22.
Original js script acquiring unit 21 obtains original js script for loading the initialization page;
Load information list acquiring unit 22, for obtaining load instruction pair using the load original js script of cached configuration The load information list answered.
Preferably, as shown in figure 9, synchronization page loading module 40 includes script name acquiring unit 41, path acquisition list Member 42 and synchronization page loading unit 43.
Script name acquiring unit 41, for obtaining the title of the corresponding js script of synchronous load information;
Path acquiring unit 42, for the path according to the synchronous load information of the name acquiring of js script;
Synchronization page loading unit 43, if the path success for obtaining synchronous load information, terminates current page Synchronous load information is shown on the page, obtains synchronization page by Rendering operations, and the synchronization load information in load path.
Preferably, target pages loading module includes script element acquiring unit, asynchronous js script acquiring unit and One target pages loading unit.
Script element acquiring unit, for obtaining preset script element;
Asynchronous js script acquiring unit, for preset script element to be inserted into the corresponding document of asynchronous load information In Object Model Structural, the asynchronous js script of asynchronous load information is obtained;
First object page loading unit shows asynchronous load information in synchronization page for executing asynchronous js script On, obtain target pages.
Preferably, target pages loading module further includes js script acquiring unit and the second target pages loading unit.
Js script acquiring unit, for using AJAX to obtain the corresponding js script of asynchronous load information;
Second target pages loading unit, for running the corresponding js foot of asynchronous load information by script execution tool This, asynchronous load information is shown in synchronization page, target pages are obtained.
Specific about page loading device limits the restriction that may refer to above for page loading method, herein not It repeats again.Modules in above-mentioned page loading device can be realized fully or partially through software, hardware and combinations thereof.On Stating each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also store in a software form In memory in computer equipment, the corresponding operation of the above modules is executed in order to which processor calls.
In one embodiment, a kind of computer equipment is provided, which can be server, internal junction Composition can be as shown in Figure 10.The computer equipment include by system bus connect processor, memory, network interface and Database.Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory packet of the computer equipment Include non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and data Library.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating The database of machine equipment is for storing the data that the page loading method uses.The network interface of the computer equipment be used for External terminal passes through network connection communication.To realize a kind of page loading method when computer program is executed by processor.
In one embodiment, a kind of computer equipment is provided, including memory, processor and storage are on a memory And the computer program that can be run on a processor, processor perform the steps of when executing computer program
The access request that client is sent is obtained, the access request includes load instruction;
It obtains the load and instructs corresponding load information list, wherein the load information list includes synchronous load Information and asynchronous load information;
The load instruction is executed, the load is obtained and instructs the corresponding initialization page;
The synchronous load information is loaded using the mode of synchronous load in the initialization page, by the synchronous load letter Breath is shown on the initialization page, obtains synchronization page;
When the synchronization page load complete, initialization the page in using asynchronous load mode load it is described it is asynchronous plus Information carrying breath, the asynchronous load information is shown in the synchronization page, target pages are obtained.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated Machine program performs the steps of when being executed by processor
Access request obtains module, and for obtaining the access request of client transmission, the access request includes that load refers to It enables;
Load information list obtains module, instructs corresponding load information list for obtaining the load, wherein described Load information list includes synchronous load information and asynchronous load information;
Page acquisition module is initialized, for executing the load instruction, the load is obtained and instructs corresponding initialization The page;
Synchronization page loading module, for loading the synchronous load using the mode of synchronous load in the initialization page The synchronous load information is shown on the initialization page, obtains synchronization page by information;
Target pages loading module is completed for working as synchronization page load, is added in the initialization page using asynchronous The mode of load loads the asynchronous load information, and the asynchronous load information is shown in the synchronization page, target is obtained The page.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, To any reference of memory, storage, database or other media used in each embodiment provided herein, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing The all or part of function of description.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of page loading method, which is characterized in that the page loading method includes:
The access request that client is sent is obtained, the access request includes load instruction;
It obtains the load and instructs corresponding load information list, wherein the load information list includes synchronous load information With asynchronous load information;
The load instruction is executed, the load is obtained and instructs the corresponding initialization page;
The synchronous load information is loaded using the mode of synchronous load in the initialization page, the synchronous load information is shown Show on the initialization page, obtains synchronization page;
It is completed when the synchronization page loads, loads the asynchronous load using the mode of asynchronous load in the initialization page and believe Breath, the asynchronous load information is shown in the synchronization page, target pages are obtained.
2. page loading method as described in claim 1, which is characterized in that described to obtain the corresponding load of the load instruction Information list, comprising:
It loads the load and instructs the corresponding initialization page, obtain the original js script;
Using original js script described in load cached configuration, obtains the load and instruct corresponding load information list.
3. page loading method as described in claim 1, which is characterized in that described to use synchronous load in the initialization page Mode load the synchronous load information, by the synchronous load information show initialization the page on, obtain synchronization page, Include:
Obtain the title of the corresponding js script of the synchronous load information;
The path of synchronous load information according to the name acquiring of the js script;
If obtaining the path success of the synchronous load information, the Rendering operations of current page are terminated, and load the path In the synchronous load information, by the synchronous load information show initialization the page on, obtain the synchronization page.
4. page loading method as claimed in claim 3, which is characterized in that it is described to be completed when the synchronization page loads, The asynchronous load information is loaded using the mode of asynchronous load in the initialization page, the asynchronous load information is shown in institute It states in synchronization page, comprising:
Obtain preset script element;
The preset script element is inserted into the corresponding DOM Document Object Model structure of the asynchronous load information, is obtained The asynchronous js script of the asynchronous load information;
The asynchronous js script is executed, the asynchronous load information is shown in the synchronization page, the page object is obtained Face.
5. page loading method as described in claim 1, which is characterized in that it is described to be completed when the synchronization page loads, The asynchronous load information is loaded using the mode of asynchronous load in the initialization page, the asynchronous load information is shown in institute It states in synchronization page, obtains target pages, comprising:
The corresponding js script of the asynchronous load information is obtained using AJAX;
The corresponding js script of the asynchronous load information is run by script execution tool, the asynchronous load information is shown In the synchronization page, the target pages are obtained.
6. a kind of page loading device, which is characterized in that the page loading device includes:
Access request obtains module, and for obtaining the access request of client transmission, the access request includes load instruction;
Load information list obtains module, instructs corresponding load information list for obtaining the load, wherein the load Information list includes synchronous load information and asynchronous load information;
Page acquisition module is initialized, for executing the load instruction, the load is obtained and instructs the corresponding initialization page;
Synchronization page loading module, for loading the synchronous load letter using the mode of synchronous load in the initialization page The synchronous load information is shown on the initialization page, obtains synchronization page by breath;
Target pages loading module uses asynchronous load in the initialization page for completing when synchronization page load Mode loads the asynchronous load information, and the asynchronous load information is shown in the synchronization page, target pages are obtained.
7. page loading device as claimed in claim 6, which is characterized in that the load information list obtains module, comprising:
Original js script acquiring unit instructs the corresponding initialization page for loading the load, obtains the original js foot This;
Load information list acquiring unit, for obtaining the load instruction using original js script described in load cached configuration Corresponding load information list.
8. page loading device as claimed in claim 6, which is characterized in that the synchronization page loading module, comprising:
Script name acquiring unit, for obtaining the title of the corresponding js script of the synchronous load information;
Path acquiring unit, the path for the synchronous load information according to the name acquiring of the js script;
Synchronization page loading unit, if the path success for obtaining the synchronous load information, terminates the wash with watercolours of current page Dye operation, and the synchronous load information in the path is loaded, the synchronous load information is shown in the initialization page On, obtain the synchronization page.
9. a kind of computer equipment, including memory, processor and storage are in the memory and can be in the processor The computer program of upper operation, which is characterized in that the processor realized when executing the computer program as claim 1 to Any one of 5 page loading methods.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In the step of realization page loading method as described in any one of claim 1 to 5 when the computer program is executed by processor Suddenly.
CN201811250183.7A 2018-10-25 2018-10-25 Page loading method and device, computer equipment and storage medium Active CN109582890B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811250183.7A CN109582890B (en) 2018-10-25 2018-10-25 Page loading method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811250183.7A CN109582890B (en) 2018-10-25 2018-10-25 Page loading method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109582890A true CN109582890A (en) 2019-04-05
CN109582890B CN109582890B (en) 2024-11-01

Family

ID=65920805

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811250183.7A Active CN109582890B (en) 2018-10-25 2018-10-25 Page loading method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109582890B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110955445A (en) * 2019-12-16 2020-04-03 平安国际智慧城市科技股份有限公司 Personal information updating method and device based on quick application and computer equipment
CN112433784A (en) * 2020-12-10 2021-03-02 东莞市盟大塑化科技有限公司 Page loading method, device, equipment and storage medium
CN113452738A (en) * 2020-03-27 2021-09-28 北京沃东天骏信息技术有限公司 Page loading method and client
CN113705152A (en) * 2020-05-20 2021-11-26 永中软件股份有限公司 Method for realizing instant preview of file
CN114371887A (en) * 2022-01-12 2022-04-19 挂号网(杭州)科技有限公司 Method, device, equipment and medium for preloading application program based on Weex framework
CN114691269A (en) * 2022-03-29 2022-07-01 广东万和新电气股份有限公司 Page updating method, device, system and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8713424B1 (en) * 2009-11-04 2014-04-29 Google Inc. Asynchronous loading of scripts in web pages
CN105354126A (en) * 2015-10-13 2016-02-24 金蝶软件(中国)有限公司 Method and device for monitoring exception in page script file
CN105760405A (en) * 2014-12-19 2016-07-13 阿里巴巴集团控股有限公司 Methods and devices for obtaining network resource for loading web page and method and device for caching network resource
CN106294658A (en) * 2016-08-04 2017-01-04 腾讯科技(深圳)有限公司 The quick methods of exhibiting of webpage and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8713424B1 (en) * 2009-11-04 2014-04-29 Google Inc. Asynchronous loading of scripts in web pages
CN105760405A (en) * 2014-12-19 2016-07-13 阿里巴巴集团控股有限公司 Methods and devices for obtaining network resource for loading web page and method and device for caching network resource
CN105354126A (en) * 2015-10-13 2016-02-24 金蝶软件(中国)有限公司 Method and device for monitoring exception in page script file
CN106294658A (en) * 2016-08-04 2017-01-04 腾讯科技(深圳)有限公司 The quick methods of exhibiting of webpage and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WEIXIN_34265814: "如何优雅高效地插入百度广告", pages 2 - 5, Retrieved from the Internet <URL:https://blog.csdn.net/weixin_34265814/article/details/86219890> *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110955445A (en) * 2019-12-16 2020-04-03 平安国际智慧城市科技股份有限公司 Personal information updating method and device based on quick application and computer equipment
CN110955445B (en) * 2019-12-16 2023-04-25 深圳赛安特技术服务有限公司 Personal information updating method and device based on quick application and computer equipment
CN113452738A (en) * 2020-03-27 2021-09-28 北京沃东天骏信息技术有限公司 Page loading method and client
CN113705152A (en) * 2020-05-20 2021-11-26 永中软件股份有限公司 Method for realizing instant preview of file
CN112433784A (en) * 2020-12-10 2021-03-02 东莞市盟大塑化科技有限公司 Page loading method, device, equipment and storage medium
CN114371887A (en) * 2022-01-12 2022-04-19 挂号网(杭州)科技有限公司 Method, device, equipment and medium for preloading application program based on Weex framework
CN114691269A (en) * 2022-03-29 2022-07-01 广东万和新电气股份有限公司 Page updating method, device, system and storage medium
CN114691269B (en) * 2022-03-29 2024-05-14 广东万和新电气股份有限公司 Page updating method, device, system and storage medium

Also Published As

Publication number Publication date
CN109582890B (en) 2024-11-01

Similar Documents

Publication Publication Date Title
CN109582890A (en) Page loading method, device, computer equipment and storage medium
US10817664B2 (en) Combined synchronous and asynchronous tag deployment
US9239705B2 (en) Method and apparatus for customized software development kit (SDK) generation
CN109684586B (en) Page optimization display method and device, computer equipment and storage medium
CN109814854B (en) Project framework generation method, device, computer equipment and storage medium
CN109254773A (en) Skeleton page generation method, device, equipment and storage medium
CN110647699A (en) Web page rendering method and device, computer equipment and storage medium
CN111563220A (en) Business website project construction method and device, computer equipment and storage medium
CN112114808B (en) Page rendering method and device and electronic equipment
CN108595697B (en) Webpage integration method, device and system
CN108108219B (en) Application program running method and device, computer equipment and storage medium
CN104704468A (en) Cross system installation of WEB applications
CN110362341B (en) Business management method, device, equipment and storage medium based on micro-service architecture
CN113805973B (en) Application program control method and device, application program development method and device
CN111880788A (en) Page rendering method, device, client and computer readable storage medium
CN111880790A (en) Page rendering method, page rendering system, and computer-readable storage medium
CN111880789A (en) Page rendering method, device, server and computer-readable storage medium
CN111783019A (en) Browser sub-page creation method and device, computer equipment and storage medium
CN113315829B (en) Client offline H5 page loading method and device, computer equipment and medium
CN109948085A (en) Browser kernel initial method, calculates equipment and storage medium at device
CN109582313A (en) Business interface dynamic construction method, device, computer equipment and storage medium
CN113032078A (en) Page display method and device, electronic equipment and computer readable storage medium
CN115562662A (en) Application page creating method and device, computer equipment and storage medium
CN115145674A (en) Page jump method, device, equipment and medium based on dynamic anchor point
CN115390835A (en) Method and device for constructing small program labeling search box

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