CN110020304A - A kind of method and apparatus of loading page - Google Patents

A kind of method and apparatus of loading page Download PDF

Info

Publication number
CN110020304A
CN110020304A CN201711224439.2A CN201711224439A CN110020304A CN 110020304 A CN110020304 A CN 110020304A CN 201711224439 A CN201711224439 A CN 201711224439A CN 110020304 A CN110020304 A CN 110020304A
Authority
CN
China
Prior art keywords
screen
page
page file
screen data
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711224439.2A
Other languages
Chinese (zh)
Inventor
李大双
李刚松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201711224439.2A priority Critical patent/CN110020304A/en
Publication of CN110020304A publication Critical patent/CN110020304A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching

Abstract

The invention discloses a kind of method and apparatus of loading page, are related to field of computer technology.One specific embodiment of this method includes: to send page file request to server end;Receive the page file comprising first screen data that server end returns;Wherein, the first screen data include needing the link of the media file shown in first screen;First screen content is generated according to the first screen data;The page comprising the first screen content is generated according to the page file.The embodiment can significantly reduce the time of loaded page kept man of a noblewoman's screen content, promote user experience.

Description

A kind of method and apparatus of loading page
Technical field
The present invention relates to field of computer technology more particularly to a kind of method and apparatus of loading page.
Background technique
With the arrival of Internet era, people are more and more abundant for the demand of web page browsing, the content of front end page Also it becomes increasingly complex.Existing front end page is mainly by hypertext markup language for display (HyperText Markup Language, HTML) file, control page logic JavaScript code, the cascading style sheets of style sheet The tools such as (Cascading Style Sheets, CSS) code composition.In order to guarantee the dynamic of the page, the basic number of the page Interface is provided according to by server, front end browser is called.The page is more complicated, and the interface for needing to call will be more, accordingly Will increase the page load time-consuming.
The method of existing loading page, when parsing page file, the logical process tool of meeting request page first is (such as JavaScript code above-mentioned and cascading style table code etc.), the content requests for then including further according to logical process tool Page data.
In realizing process of the present invention, at least there are the following problems in the prior art for inventor's discovery: due to needing to solve Logical process tool ability request interface data later are analysed, page data are further then obtained according to interface data, therefore want Undergo multiple request process.Taking long time when causing to load complex page, user has the very long waiting time.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of method and apparatus of loading page, loading page can be reduced Time promotes user experience.
To achieve the above object, according to an aspect of an embodiment of the present invention, a kind of method of loading page is provided, is wrapped It includes:
Page file request is sent to server end;
Receive the page file comprising first screen data that server end returns;Wherein, the first screen data include needing The link for the media file that head screen is shown;
First screen content is generated according to the first screen data;
The page comprising the first screen content is generated according to the page file.
Optionally, after described the step of sending page file request to server end, comprising:
Server end includes preparatory according to the page file request after receiving the page file request The page file of the first screen data of addition, and return to the page file comprising the first screen data;Alternatively,
Server end is after receiving page file request, according to the page file request page file, The head screen logical process tool in the page file is parsed, first screen data are obtained according to parsing result, the head is shielded into data The page file is added, and returns to the page file comprising the first screen data.
Optionally, according to the page file generate include the first page for shielding content the step of after, comprising:
Obtain non-first screen logical process tool and non-first screen data;
Non- first screen content is generated according to the non-first screen logical process tool and non-first screen data;
The non-first screen content is added to the page.
Optionally, it obtains non-first screen logical process tool and non-first the step of shielding data includes:
Parse the non-first screen logical process tool;
The non-first screen data that need to be obtained according to parsing result determination;
With the presence or absence of the non-first screen data that need to be obtained in judgement caching;
If it does not exist, then the request to the non-first screen data that need to be obtained is sent to server end;
If it exists, then the non-first screen data that need to be obtained are obtained from the caching.
To achieve the above object, other side according to an embodiment of the present invention provides a kind of device of loading page, Include:
Page file request module, for sending page file request to server end;
Page file receiving module, for receiving the page file comprising first screen data of server end return;Wherein, institute Stating first screen data includes needing the link of the media file shown in first screen;
Head screen content generating module, for generating first screen content according to the first screen data;
Head screen page generation module, for generating the page comprising the first screen content according to the page file.
Optionally, server end is after receiving the page file request, according to the page file request packet Page file containing pre-added first screen content, and return to the page file comprising the first screen content;Alternatively,
Server end is after receiving page file request, according to the page file request page file, The first screen logical process tool in the page file is parsed, first screen data are obtained according to parsing result, are patrolled according to the first screen After volume handling implement and the first screen data generate first screen content, the page file is added in the first screen content, and return Return the page file comprising the first screen content.
Optionally, described device further include:
Non- first screen content generating module, for obtaining non-first screen logical process tool and non-first screen data;According to described non- Head screen logical process tool and non-first screen data generate non-first screen content;
Renewal of the page module, for the non-first screen content to be added to the page.
Optionally, the non-first screen content generating module is also used to:
Parse the non-first screen logical process tool;The non-first screen data that need to be obtained according to parsing result determination;Judgement is slow With the presence or absence of the non-first screen data that need to be obtained in depositing;If it does not exist, then to server end send to it is described need to obtain it is non- The request of head screen data;If it exists, then the non-first screen data that need to be obtained are obtained from the caching.
To achieve the above object, other side according to an embodiment of the present invention provides a kind of electronics of loading page Equipment, comprising:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processing Device is at least realized:
Page file request is sent to server end;
Receive the page file comprising first screen data that server end returns;Wherein, the first screen data include needing The link for the media file that head screen is shown;
First screen content is generated according to the first screen data;
The page comprising the first screen content is generated according to the page file.
To achieve the above object, other side according to an embodiment of the present invention provides a kind of computer-readable medium, On be stored with computer program, at least realized when described program is executed by processor:
Page file request is sent to server end;
Receive the page file comprising first screen data that server end returns;Wherein, the first screen data include needing The link for the media file that head screen is shown;
First screen content is generated according to the first screen data;
The page comprising the first screen content is generated according to the page file.
One embodiment in foregoing invention has the following advantages that or the utility model has the advantages that because sends the page using in browser The technological means that the page file comprising first screen data is returned when file request allows browser directly to show first screen data institute Corresponding first screen content, without carrying out means requests or request of data again, the load for reducing page head screen content is time-consuming, So overcoming the existing complex page technical problem long because of page load time caused by repeatedly requesting, and then reach raising Page loading velocity, the technical effect for promoting user experience.
Further effect possessed by above-mentioned non-usual optional way adds hereinafter in conjunction with specific embodiment With explanation.
Detailed description of the invention
Attached drawing for a better understanding of the present invention, does not constitute an undue limitation on the present invention.Wherein:
Fig. 1 is the schematic diagram of the key step of the method for loading page according to an embodiment of the present invention;
Fig. 2 is a kind of timing diagram of the key step of optional implementation of the method for loading page of the present invention;
Fig. 3 is the schematic diagram of the main modular of the device of loading page according to an embodiment of the present invention;
Fig. 4 is the schematic diagram of the main modular of the device of loading page according to another embodiment of the present invention;
Fig. 5 is that the embodiment of the present invention can be applied to exemplary system architecture figure therein;
Fig. 6 is adapted for the structural representation of the computer system for the terminal device or server of realizing the embodiment of the present invention Figure.
Specific embodiment
Below in conjunction with attached drawing, an exemplary embodiment of the present invention will be described, including the various of the embodiment of the present invention Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize It arrives, it can be with various changes and modifications are made to the embodiments described herein, without departing from scope and spirit of the present invention.Together Sample, for clarity and conciseness, descriptions of well-known functions and structures are omitted from the following description.
Fig. 1 is the schematic diagram of the key step of the method for loading page according to an embodiment of the present invention.
As shown in Figure 1, a kind of method of the loading page provided according to embodiments of the present invention, comprising:
S10, client send page file request.The page file requests requested page file Refer to the file of content, pattern, display effect for describing the page etc., page file can be by the browser resolves of client To organize, be formed the page, such as page file can be html file.
S11, server end generate the page file comprising first screen data;Wherein, the first screen data include needing in head Shield the link of the media file shown.The content shown in the page after head screen data can be directly acquired corresponding to browser; This step can be substituted browser end by server end and be completed to parsing and the wash with watercolours for shielding data-dependent portion in page file with head Dye is obtained by server end and is parsed according to page file first screen logical process tool, obtains first screen data, then shields head Data and/or its relevant logical process tool etc. are added in page file.The logical process tool refers to for describing The tool of the logic rules of the page, function include the position of determining each element, size, color, hierarchical relationship, rendering effect Deng, such as logical process tool may include JavaScript code or CSS code.Alternatively, can also be by manually in advance in page Add the correlative code of first screen data in the file of face, for example, the media files such as picture or video link and/or corresponding patrol Collect handling implement etc..Optionally, the generation and addition of first screen content are completed in this step using dynamic state server.
The page file is sent to client by S12, server end.
S13, client receive the page file comprising first screen data that server end returns." head screen data " are often referred to page Data corresponding to more important content in face, browser corresponding content can be directly obtained according to these data and Additional resolving is needed, such as is more easier from visual angle the content for causing user to pay attention to, including title, important text The link of the equal media contents such as content of text or picture, video.
As it can be seen that the first screen content in the present embodiment is not the full content in the page, except it is first shield content in addition to other Non- first screen content can be not accompanied by page file and return together, but by browser end according to page file by conventional method into Row request, parsing and rendering.Due to the quick display of first screen content, it can directly be seen that the master of the page for the angle of user Content is wanted, during user's browsing pages main contents, browser can further complete the load of non-first screen content, from And the user experience is improved.
S14, client generate first screen content according to the first screen data.According to explanation above, number can be shielded according to head According to corresponding first screen content is directly obtained, then head screen content is shown according to the setting of page file;If the page Further include logical process tool required for handling first screen data in file, then directly head can be shielded according to logical process tool Data are handled, and to obtain first screen content, then show the page comprising first screen content.
S15, client generate the page comprising the first screen content according to the page file.Due to head screen content be can With the content directly displayed, therefore when executing this step, browser is not necessarily to carry out after generating the first screen content in page file Additional request can directly be shown.It is carried out as it can be seen that the present embodiment distributes the processing work of first screen content to server end, or It carries out in advance, to reduce the request number of times when generating first screen content, has saved the plenty of time.
From the above it can be seen that the method for loading page provided in this embodiment is because send page using in browser The technological means that the page file comprising first screen data is returned when the file request of face allows browser directly to show first screen data Corresponding first screen content reduces the load consumption of page head screen content without carrying out means requests or request of data again When, so overcoming the existing complex page technical problem long because of page load time caused by repeatedly requesting, and then reach The technical effect for improving page loading velocity, promoting user experience.
In some alternative embodiments, the method also includes in S14, client is generated according to the page file After the step of including the page of the first screen content:
Generate non-first screen content;
The non-first screen content is added to the page.
Wherein, the step of generating non-first screen data include:
Obtain non-first screen logical process tool;
Parse the non-first screen logical process tool;
Non- first screen data are obtained according to parsing result;
Non- first screen content is generated according to the non-first screen logical process tool and non-first screen data.
After generating the page comprising first screen content, browser can further generate its in the page according to page file His content, i.e., non-first screen content.Browser obtains according to page file and parses non-first screen logical process tool, and further asks Non- first screen data specified by non-first screen logical process tool after solving analysis (mainly include interface data, such as picture, sound The domain name link of the media files such as sound, video), finally non-first screen data are rendered according to non-first screen logical process tool, To generate non-first screen content.
In some alternative embodiments, the non-first screen logical process is obtained using Asynchronous Request, received mode Tool and non-first screen data, for example, by using asynchronous JavaScript and XML (Asynchronous JavaScript And XML, ) etc. AJAX technologies are realized.
According to some optional embodiments of the present embodiment, described the step of non-first screen data are obtained according to parsing result Include:
The non-first screen data that need to be obtained according to parsing result determination;
With the presence or absence of the non-first screen data in judgement caching;
If it does not exist, then the request to the non-first screen data is sent to server end;
If it exists, then the non-first screen data are obtained from the caching.
According to the present embodiment, if having requested that related non-first screen data in page loading procedure before, When this obtains non-first screen data, the non-first screen data cached can be no longer re-requested.In the step of executing the present embodiment When, the longer pot-life can be arranged in the buffer in some common non-first screen data with the storage rule of preset cache, with It is standby to reuse;Further, it is also possible to which re-request needs to update after detecting that the non-first screen data in caching need to update Non- first screen data and replace existing non-first screen data in caching.
In some alternative embodiments, the method also includes in S14, client is generated according to the page file After the step of including the page of the first screen content:
Domain name pre-parsed is carried out to the non-first screen data link that the page file includes.
Domain name mapping is that domain name is directed toward web space IP address (Internet Protocol Address, internet protocol Discuss address) process.Signified pre-parsed in the present embodiment refers to and is obtaining non-first screen number according to page file to server end According to the IP address for before, obtaining domain name link corresponding to non-first screen data in advance, can so be saved in subsequent acquisition data The about time of domain name mapping, the speed for improving request and obtaining.The related command of domain name pre-parsed can be added by server end Enter into page file.
In some alternative embodiments, the method also includes in S14, client is generated according to the page file After the step of including the page of the first screen content:
The first screen content of the next stage page is preloaded according to the link of the next stage page in the page.
During user browses current page, browser is in idle condition in the most of the time.The present embodiment exists In the free time of browser, according to the link for the next stage page for including in current page to the first screen number in the next stage page According to or logical process tool preloaded, so user click the next stage page link after, can save under request Time spent by first screen data or logical process tool in first level pages, improve the loading velocity of the next stage page.
The method of loading page provided by the invention is further described below by a specific example.
Fig. 2 is a kind of timing diagram of the key step of optional implementation of the method for loading page of the present invention.
As shown in Fig. 2, the present embodiment provides a kind of loading method of front end page based on HTML, suitable for being provided with branch The electronic equipment of the browser of html page is held, key step includes:
S200, browser request HTML frame to dynamic state server.HTML frame described in this step is comprising the source HTML The html file of code and first screen content.The meaning of head screen content is in the aforementioned embodiment it is stated that in the present embodiment, institute Stating first screen content mainly includes the first screen picture by processing such as renderings.
S201, dynamic state server generate HTML frame.HTML frame compared with common html page, in the present embodiment Other than comprising html source code, first screen data have been further comprised, have been needed when HTML frame is added in head screen data Dynamically head screen data are rendered, therefore is not available static server (such as server in content distribution network) and mentions For, and need to be previously-completed rendering work using dynamic state server.
S202, dynamic state server return to HTML frame to browser.
S203, browser resolves HTML frame.Browser after parsing HTML frame, it is available to page source code and Head screen data.Can be with direct request head screen content due to shielding data according to head, and first screen content is used directly for showing, therefore After the S203 that is finished, browser will show first screen content in the page, and user is made to may browse through the important information in the page. Other non-first interior perhaps functional units of screen in the page in addition to first screen content are further requested in the next steps and load.
S204, browser request CSS, JS to content distributing network.CSS refers to that cascading style table code, JS refer to JavaScript code.Content distributing network (Content Delivery Network, CDN) by placing section in network everywhere One on the existing Internet basic layer intelligent virtual network that point server is constituted, CDN system being capable of roots in real time According to the connection of network flow and each node, load state and to the integrated informations such as the distance of user and response time by user's Request re-directs on the service node nearest from user.The purpose is to make user that can obtain required content nearby, solve The crowded situation of Internet network improves the response speed that user accesses website.Content distributing network in the present embodiment It can refer to the node server in content distributing network.Other than using the node server in content distributing network, this reality Applying example can also use common server to provide data storage service support.
Before executing step S204, browser can search JS and CSS code to be requested in local cache, if can It finds, then this partial data no longer needs to request to server end, reduces the time-consuming of request data, improves the load of the page Speed.
When executing step S204, the quantity and currently network-like of the non-first screen picture of request can according to need State determines that requested non-first screen picture quality and whether needing requests the corresponding non-first screen picture of different domain names respectively, with Optimize bandwidth availability ratio or breaks through the single domain name number of downloads limitation of browser.
S205, content distributing network read CSS, JS.
S206, content distributing network return to CSS, JS to browser.
S207, browser resolves simultaneously execute JS.The prior art is also needed further after parsing JS to JS specified data Interface requests head screen picture, needs extra consumption certain time;And it is subsequent due to that can not be carried out before interface data returns Parsing and load work, therefore can further slow down the loading velocity of the page.The present embodiment is then added in html frame in advance Head screen content, i.e., the link of first screen picture, directly can carry out page rendering according to JS and the link after parsing JS, thus Improve processing speed.
Before step S207, browser can be ordered by dns-prefetch (DNS pre-parsed) etc. to non-first screen data In domain name carry out pre-parsed, with improve follow-up data acquisition speed.
S208, browser shield interface data to the non-head of each interface data server request.In order to guarantee adding for the first screen page Speed is carried, non-first screen interface data is not included in first screen content, further request in this step.Non- first screen interface data can To include such as the link of non-first screen picture.
S209, interface data server generate non-first screen interface data.
S210, interface data server return to non-first screen interface data to browser.
S211, browser shield picture to the non-head of content distributing network request.
S212, content distributing network read non-first screen picture.
S213, content distributing network return to non-first screen picture to browser.
When executing step S208-S213, non-first screen content, the Local hydrodynamic unit page can be requested by AJAX mode.
To step S213, current page loads completion completely.It, can also be according to the chain in current page after step S213 It connects and the content (the CSS file for referring mainly to the next stage page) of the next stage page is preloaded, to improve load next stage The speed of the page.
From the above it can be seen that method provided in this embodiment is because send page file request using in browser When return to the technological means of the page file comprising first screen data, so that browser is directly shown head corresponding to first screen data Shield content, without carrying out means requests or request of data again, the load for reducing page head screen content is time-consuming, so overcoming The existing complex page technical problem long because of page load time caused by multiple request, and then reach and improve page load Speed, the technical effect for promoting user experience.
Fig. 3 is the schematic diagram of the main modular of the device of loading page according to an embodiment of the present invention.
As shown in figure 3, the device 300 of the loading page provided according to embodiments of the present invention, is mainly used in client, packet It includes:
Page file request module 301, for sending page file request to server end;
Page file receiving module 302, for receiving the page file comprising first screen data of server end return;Its In, the first screen data include needing the link of the media file shown in first screen;
Head screen content generating module 303, for generating first screen content according to the first screen data;
Head screen page generation module 304, for generating the page comprising the first screen content according to the page file.
In some alternative embodiments, described device 300 further include:
Non- first screen content generating module 305, for generating non-first screen content;
Renewal of the page module 306, for the non-first screen content to be added to the page.
In some alternative embodiments, the non-first screen content generating module 304 is also used to: being patrolled for obtaining non-first screen Collect handling implement and non-first screen data;Non- first screen content is generated according to the non-first screen logical process tool and non-first screen data.
In some alternative embodiments, the non-first screen content generating module 304 is also used to: being determined according to parsing result The non-first screen data that need to be obtained;With the presence or absence of the non-first screen data in judgement caching;If it does not exist, then it is sent to server end Request to the non-first screen data;If it exists, then the non-first screen data are obtained from the caching.
In some alternative embodiments, described device 300 further include:
Pre-parsed module 307, for carrying out domain name pre-parsed to the non-first screen data link that the page file includes.
In some alternative embodiments, described device 300 further include:
Preloaded components 308, for preloading the next stage page according to the link of the next stage page in the page First screen content.
From the above it can be seen that the device of loading page provided in an embodiment of the present invention using in browser because send out The technological means that the page file comprising first screen data is returned when page file being sent to request, allows browser directly to show first screen Head corresponding to data shields content, without carrying out means requests or request of data again, reduces adding for page head screen content Time-consuming is carried, so overcoming the existing complex page technical problem long because of page load time caused by repeatedly requesting, in turn Reach the technical effect for improving page loading velocity, promoting user experience.
Fig. 4 is the schematic diagram of the main modular of the device of loading page according to another embodiment of the present invention.
As shown in figure 4, the device 400 of the loading page provided according to embodiments of the present invention, is mainly used in server end, Include:
Page file request receiving module 401, for receiving the page file request of client transmission;
Head screen data processing module 402 is used to generate first screen data according to the page file, then by the first screen number According to being added to the page file;
Page file sending module 403, for the page file to be sent to client.
In some alternative embodiments, the first screen data processing module 402 is also used to: being parsed in the page file First screen logical process tool;First screen data are obtained according to parsing result.
In some alternative embodiments, device 400 is after receiving the page file request, according to the page text Part request includes the page file of pre-added first screen data, and returns to the page text comprising the first screen data Part;Alternatively, device 400, according to the page file request page file, solves after receiving the page file request The first screen logical process tool in the page file is analysed, first screen data are obtained according to parsing result, the first screen data are added Enter the page file, and returns to the page file comprising the first screen data.
From the above it can be seen that the device of loading page provided in an embodiment of the present invention using in browser because send out The technological means that the page file comprising first screen data is returned when page file being sent to request, allows browser directly to show first screen Head corresponding to data shields content, without carrying out means requests or request of data again, reduces adding for page head screen content Time-consuming is carried, so overcoming the existing complex page technical problem long because of page load time caused by repeatedly requesting, in turn Reach the technical effect for improving page loading velocity, promoting user experience.
Fig. 5 is shown can be using the exemplary of the device of the method or loading page of the loading page of the embodiment of the present invention System architecture 500.
As shown in figure 5, system architecture 500 may include terminal device 501,502,503, network 504 and server 505. Network 504 between terminal device 501,502,503 and server 405 to provide the medium of communication link.Network 504 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 501,502,503 and be interacted by network 504 with server 505, to receive or send out Send message etc..Various telecommunication customer end applications, such as the application of shopping class, net can be installed on terminal device 501,502,503 The application of page browsing device, searching class application, instant messaging tools, mailbox client, social platform software etc..
Terminal device 501,502,503 can be the various electronic equipments with display screen and supported web page browsing, packet Include but be not limited to smart phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 505 can be to provide the server of various services, such as utilize terminal device 501,502,503 to user The page browsed provides dns server, CDN server, the data server either statically or dynamically etc. supported.
It should be understood that the number of terminal device, network and server in Fig. 5 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.
According to an embodiment of the invention, the present invention also provides a kind of electronic equipment and a kind of readable storage medium storing program for executing.
Fig. 6 is adapted for the structural representation of the computer system for the terminal device or server of realizing the embodiment of the present invention Figure.
Below with reference to Fig. 6, it illustrates the computer systems 600 for the terminal device for being suitable for being used to realize the embodiment of the present invention Structural schematic diagram.Terminal device shown in Fig. 6 is only an example, function to the embodiment of the present invention and should not use model Shroud carrys out any restrictions.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored in Program in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 and Execute various movements appropriate and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data. CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always Line 604.
I/O interface 605 is connected to lower component: the importation 606 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 608 including hard disk etc.; And the communications portion 609 of the network interface card including LAN card, modem etc..Communications portion 609 via such as because The network of spy's net executes communication process.Driver 610 is also connected to I/O interface 605 as needed.Detachable media 611, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 610, in order to read from thereon Computer program be mounted into storage section 608 as needed.
Particularly, according to an embodiment of the invention, the process of the schematic diagram description of key step may be implemented as above Computer software programs.For example, the embodiment of the present invention includes a kind of computer program product comprising being carried on computer can The computer program on medium is read, which includes the program for executing method shown in the schematic diagram of key step Code.In such embodiments, which can be downloaded and installed from network by communications portion 609, and/ Or it is mounted from detachable media 611.When the computer program is executed by central processing unit (CPU) 601, the present invention is executed System in the above-mentioned function that limits.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the present invention, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In invention, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned Any appropriate combination.
Flow chart and block diagram in attached drawing illustrate system, method and computer journey according to the various embodiments of the present invention The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.
Being described in module involved in the embodiment of the present invention can be realized by way of software, can also be by hard The mode of part is realized.Described module also can be set in the processor, for example, can be described as: a kind of processor packet Include page file request module 301, page file receiving module 302 and first screen page generation module 303.Wherein, these modules Title do not constitute the restriction to the module itself under certain conditions, for example, first screen page generation module 303 can also quilt It is described as " for generating the module of the page comprising the first screen content according to the page file ".
As on the other hand, the present invention also provides a kind of computer-readable medium, which be can be Included in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the equipment, makes The equipment is obtained at least to realize:
Page file request is sent to server end;
Receive the page file comprising first screen content that server end returns;
The page comprising the first screen content is generated according to the page file.
In another optional embodiment, when said one or multiple programs are executed by the equipment, so that The equipment is at least realized:
Receive the page file request that client is sent;
First screen content is generated according to the page file, the first screen content is then added to the page file;
The page file is sent to client.
Technical solution according to an embodiment of the present invention, because including using being returned when browser sends page file request The technological means of the page file of head screen content allows browser directly to show the first screen content, without carrying out again Means requests or request of data, the load for reducing page head screen content is time-consuming, so overcoming existing complex page because more The long technical problem of page load time caused by secondary request, and then reach and improve page loading velocity, promote user experience Technical effect.
Above-mentioned specific embodiment, does not constitute a limitation on the scope of protection of the present invention.Those skilled in the art should be bright It is white, design requirement and other factors are depended on, various modifications, combination, sub-portfolio and substitution can occur.It is any Made modifications, equivalent substitutions and improvements etc. within the spirit and principles in the present invention, should be included in the scope of the present invention Within.

Claims (10)

1. a kind of method of loading page characterized by comprising
Page file request is sent to server end;
Receive the page file comprising first screen data that server end returns;Wherein, the first screen data include needing to shield in head The link of the media file of displaying;
First screen content is generated according to the first screen data;
The page comprising the first screen content is generated according to the page file.
2. the method according to claim 1, wherein described send the step of page file is requested to server end Afterwards, comprising:
Server end includes preparatory addition according to the page file request after receiving the page file request First screen data page file, and return to the page file comprising the first screen data;Alternatively,
Server end is after receiving the page file request, according to the page file request page file, parsing First screen logical process tool in the page file obtains first screen data according to parsing result, and the first screen data are added The page file, and return to the page file comprising the first screen data.
3. the method according to claim 1, wherein being generated according to the page file comprising the first screen content The page the step of after, comprising:
Obtain non-first screen logical process tool and non-first screen data;
Non- first screen content is generated according to the non-first screen logical process tool and non-first screen data;
The non-first screen content is added to the page.
4. according to the method described in claim 3, it is characterized in that, the non-first screen logical process tool of acquisition and non-head shield data Step includes:
Parse the non-first screen logical process tool;
The non-first screen data that need to be obtained according to parsing result determination;
With the presence or absence of the non-first screen data that need to be obtained in judgement caching;
If it does not exist, then the request to the non-first screen data that need to be obtained is sent to server end;
If it exists, then the non-first screen data that need to be obtained are obtained from the caching.
5. a kind of device of loading page characterized by comprising
Page file request module, for sending page file request to server end;
Page file receiving module, for receiving the page file comprising first screen data of server end return;Wherein, the head Screen data include needing the link of the media file shown in first screen;
Head screen, which generates, obtains module, for generating first screen content according to the first screen data;
Head screen page generation module, for generating the page comprising the first screen content according to the page file.
6. device according to claim 5, which is characterized in that
Server end includes preparatory addition according to the page file request after receiving the page file request First screen data page file, and return to the page file comprising the first screen data;Alternatively,
Server end is after receiving the page file request, according to the page file request page file, parsing First screen logical process tool in the page file obtains first screen data according to parsing result, and the first screen data are added The page file, and return to the page file comprising the first screen data.
7. device according to claim 5, which is characterized in that described device further include:
Non- first screen content generating module, for obtaining non-first screen logical process tool and non-first screen data;According to the non-first screen Logical process tool and non-first screen data generate non-first screen content;
Renewal of the page module, for the non-first screen content to be added to the page.
8. device according to claim 7, which is characterized in that the non-first screen content generating module is also used to:
Parse the non-first screen logical process tool;The non-first screen data that need to be obtained according to parsing result determination;In judgement caching With the presence or absence of the non-first screen data that need to be obtained;If it does not exist, then it sends to server end to the non-first screen that need to be obtained The request of data;If it exists, then the non-first screen data that need to be obtained are obtained from the caching.
9. a kind of electronic equipment of loading page characterized by comprising
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now method as described in any in claim 1-4.
10. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is held by processor The method as described in any in claim 1-4 is realized when row.
CN201711224439.2A 2017-11-29 2017-11-29 A kind of method and apparatus of loading page Pending CN110020304A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711224439.2A CN110020304A (en) 2017-11-29 2017-11-29 A kind of method and apparatus of loading page

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711224439.2A CN110020304A (en) 2017-11-29 2017-11-29 A kind of method and apparatus of loading page

Publications (1)

Publication Number Publication Date
CN110020304A true CN110020304A (en) 2019-07-16

Family

ID=67185947

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711224439.2A Pending CN110020304A (en) 2017-11-29 2017-11-29 A kind of method and apparatus of loading page

Country Status (1)

Country Link
CN (1) CN110020304A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110753098A (en) * 2019-10-12 2020-02-04 北京达佳互联信息技术有限公司 Download request execution method and device, server and storage medium
CN111274512A (en) * 2020-01-16 2020-06-12 深圳市元征科技股份有限公司 Page loading method, device and medium
CN111563225A (en) * 2020-07-13 2020-08-21 随身云(南京)信息技术有限公司 Source code filling method and platform for overcoming first screen blank
CN111639289A (en) * 2020-05-13 2020-09-08 北京三快在线科技有限公司 Webpage loading method and device
CN112434233A (en) * 2020-02-20 2021-03-02 上海哔哩哔哩科技有限公司 Method and equipment for accelerating first screen rendering of secondary page
CN114518912A (en) * 2022-02-21 2022-05-20 度小满科技(北京)有限公司 Page loading method, device and equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102760133A (en) * 2011-04-28 2012-10-31 腾讯科技(深圳)有限公司 Webpage loading method, webpage loading system, browser, terminal and server
CN105205157A (en) * 2015-09-28 2015-12-30 北京奇艺世纪科技有限公司 Page loading method, device and system
CN106339414A (en) * 2016-08-12 2017-01-18 合网络技术(北京)有限公司 Webpage rendering method and device
CN107391664A (en) * 2017-07-19 2017-11-24 广州华多网络科技有限公司 Page data processing method and system based on WEB
CN107402938A (en) * 2016-05-22 2017-11-28 广州市动景计算机科技有限公司 page display method, device and client device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102760133A (en) * 2011-04-28 2012-10-31 腾讯科技(深圳)有限公司 Webpage loading method, webpage loading system, browser, terminal and server
CN105205157A (en) * 2015-09-28 2015-12-30 北京奇艺世纪科技有限公司 Page loading method, device and system
CN107402938A (en) * 2016-05-22 2017-11-28 广州市动景计算机科技有限公司 page display method, device and client device
CN106339414A (en) * 2016-08-12 2017-01-18 合网络技术(北京)有限公司 Webpage rendering method and device
CN107391664A (en) * 2017-07-19 2017-11-24 广州华多网络科技有限公司 Page data processing method and system based on WEB

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110753098A (en) * 2019-10-12 2020-02-04 北京达佳互联信息技术有限公司 Download request execution method and device, server and storage medium
CN111274512A (en) * 2020-01-16 2020-06-12 深圳市元征科技股份有限公司 Page loading method, device and medium
CN112434233A (en) * 2020-02-20 2021-03-02 上海哔哩哔哩科技有限公司 Method and equipment for accelerating first screen rendering of secondary page
CN112434233B (en) * 2020-02-20 2023-03-07 上海哔哩哔哩科技有限公司 Method and device for accelerating first screen rendering of secondary page
CN111639289A (en) * 2020-05-13 2020-09-08 北京三快在线科技有限公司 Webpage loading method and device
CN111639289B (en) * 2020-05-13 2024-02-23 北京三快在线科技有限公司 Webpage loading method and device
CN111563225A (en) * 2020-07-13 2020-08-21 随身云(南京)信息技术有限公司 Source code filling method and platform for overcoming first screen blank
CN114518912A (en) * 2022-02-21 2022-05-20 度小满科技(北京)有限公司 Page loading method, device and equipment and readable storage medium
CN114518912B (en) * 2022-02-21 2023-04-25 度小满科技(北京)有限公司 Page loading method, device, equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN110020304A (en) A kind of method and apparatus of loading page
CN106991154B (en) Webpage rendering method and device, terminal and server
EP3172680B1 (en) Fast rendering of websites containing dynamic content and stale content
CN109683998A (en) Internationalize implementation method, device and system
CN110019350A (en) Data query method and apparatus based on configuration information
EP3896567A1 (en) Page pre-rendering method and apparatus, electronic device, and storage medium
CN110830374B (en) Method and device for gray level release based on SDK
CN111814024B (en) Distributed data acquisition method, system and storage medium
CN110888696A (en) Page display method and system, computer system and computer readable medium
CN109961331A (en) Page processing method and its system, computer system and readable storage medium storing program for executing
CN112579928A (en) Page jump method, page jump device, computer equipment and computer readable storage medium
CN110795649A (en) Target page display method, device and system and electronic equipment
CN111294395A (en) Terminal page transmission method, device, medium and electronic equipment
CN110502699A (en) Method and apparatus for obtaining information
CN109343975A (en) Method and apparatus for asynchronous communication between the page
CN110807535A (en) Construction method and construction device of unified reservation platform and unified reservation platform system
CN110020349A (en) The method and device of page rendering
CN112486482A (en) Page display method and device
CN109710604A (en) Data processing method, device, system, computer readable storage medium
CN110020320A (en) The method and apparatus for caching page pictures
CN111753226A (en) Page loading method and device
CN111338928A (en) Chrome-based browser testing method and device
CN110019393A (en) A kind of method and apparatus of fuzzy query
CN113626113B (en) Page rendering method and device
CN110244975A (en) A kind of generation method and device of static resource version number

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