The method, apparatus and system of webpage rendering
Technical field
The present invention relates to Internet technical fields, more particularly to the method, apparatus and system of a kind of rendering of webpage.
Background technique
Usual browser generally requires the hypertext markup language to network side requested webpage when carrying out webpage rendering
(Hypertext Markup Language, abbreviation HTML) file, cascading style list (Cascading Style Sheets,
Abbreviation CSS) and scripting language (JavaScript, abbreviation JS) etc..Wherein, web document is carried in html file, determines webpage
The data content of middle display;CSS is for providing the layout architecture (such as position and size of input frame) of webpage;JS is then used to add
The human-computer interaction function of screening page.
In existing webpage render process, browser needs to obtain above-mentioned three kinds of files respectively, browser with
The data volume of network side interaction is larger, when network side server processing capacity is limited or network bandwidth anxiety, webpage rendering
Speed can be slack-off, generates the longer waiting time.
Summary of the invention
In view of this, being able to solve webpage rendering speed the invention proposes the method, apparatus and system of a kind of rendering of webpage
Spend slow problem.
First aspect according to the present invention, the present invention provides a kind of methods of webpage rendering, comprising:
When carrying out webpage rendering, user end to server reports the file identification of hypertext markup language html file,
So that server judges whether network side has the update file of html file according to file identification;
If server judges that network side does not have the update file of html file, client reception server issues offline
Render instruction;
Client reads the html file stored in local data base according to offline render instruction;
Client renders webpage according to the html file of reading.
The second aspect according to the present invention, the present invention also provides a kind of methods of webpage rendering, comprising:
When client carries out webpage rendering, server receives the hypertext markup language html file that client reports
File identification;
Server judges whether received file identification is identical as the file identification of the newest html file of network side;
If received file identification is identical as the file identification of the newest html file of network side, server is under client
Send out render instruction offline, instruction client renders webpage according to the html file in local data base.
In terms of third according to the present invention, the present invention also provides a kind of device of webpage rendering, the usual positions of the device
In client, comprising:
Reporting unit, for reporting the text of hypertext markup language html file to server when carrying out webpage rendering
Part mark, so that server judges whether network side has the update file of html file according to file identification;
Receiving unit, for judging that network side does not have html file according to the file identification that reporting unit reports when server
Update file when, receive the offline render instruction that issues of server;
Reading unit, for reading the HTML stored in local data base according to the received offline render instruction of receiving unit
File;
Processing unit, the html file for being read according to reading unit render webpage.
The 4th aspect according to the present invention, the present invention also provides a kind of device of webpage rendering, the usual positions of the device
In server, comprising:
Receiving unit, for receiving the hypertext markup language that client reports when client carries out webpage rendering
The file identification of html file;
Judging unit, for judging the file identification of the received file identification of receiving unit Yu the newest html file of network side
It is whether identical;
Issuance unit, for judging the files-designated of received file identification Yu the newest html file of network side when judging unit
It is sensible to issue offline render instruction to client simultaneously, indicate client according to the html file in local data base to webpage
It is rendered.
The 5th aspect according to the present invention, the present invention also provides a kind of system of webpage rendering, which includes visitor
Family end and server, wherein client includes device as described in the preceding third aspect, and server is comprising such as institute in terms of first 4th
The device stated.
By above-mentioned technical proposal, the method, apparatus and system of webpage rendering provided in an embodiment of the present invention can be by taking
The mode that business device is compared according to the file identification of html file, judges whether network side has the update text of the html file
Part, in the case where no update file, offline render instruction that client can be issued according to server is from local data base
It is middle to read the html file stored before this, to be rendered to webpage.Compared with prior art, the present invention can be avoided every time
Html file all is obtained from server when rendering webpage, client off-line pair can be made in the case where html file does not update
Webpage is rendered.Since without the data to server request html file, the speed of webpage rendering is not by Netowrk tape
Wide or server handling ability limitation, can be greatly improved the speed of webpage rendering.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention,
And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can
It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field
Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention
Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows the process of the method for the webpage rendering provided in an embodiment of the present invention for being mainly used for client-side
Figure;
Fig. 2 shows the processes of the method for the webpage rendering provided in an embodiment of the present invention for being mainly used for server-side
Figure;
The structure that Fig. 3 shows the device of the webpage rendering provided in an embodiment of the present invention for being mainly used for client-side is shown
It is intended to;
The structure that Fig. 4 shows the device of the webpage rendering provided in an embodiment of the present invention for being mainly used for server-side is shown
It is intended to;
Fig. 5 shows a kind of schematic diagram of the system of webpage rendering provided in an embodiment of the present invention.
Specific embodiment
It is described more fully the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although showing this public affairs in attached drawing
The exemplary embodiment opened, it being understood, however, that may be realized in various forms the disclosure without the implementation that should be illustrated here
Example is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the model of the disclosure
It encloses and is fully disclosed to those skilled in the art.
To solve the problems, such as that webpage rendering speed is excessively slow, the embodiment of the present invention provides a kind of method of webpage rendering, the party
Method is mainly used for client-side, as shown in Figure 1, this method comprises:
101, user end to server reports the file identification of hypertext markup language html file.
Html file is the language being most widely used on current network, and constitutes the dominant language of web document.
The descriptive text that html file is made of HTML command, HTML command can be with comment, figure, animation, sound, tables
With link etc..Under normal conditions, html file can be read by a variety of web browser clients, so that rendering has figure
The webpage of the visual informations such as piece, text.In the prior art, it is hard to be stored in the server being distributed in all over the world for these html files
On disk, user can remotely obtain different html files by transport protocol.In actual life, when user is clear on the internet
Look at webpage when, acquisition and rendering to html file is completed by some clients (usually various browser clients), it is raw
At Webpage.
In the prior art, no matter whether html file has update file, and client is wanted every time when carrying out webpage rendering
Html file is obtained from server.Method provided in an embodiment of the present invention does not directly acquire the html file on server, but
Have judges the step of whether html file updates in advance.As step 101 reports to server the file identification of html file.
The file identification of the file identification for the html file that server reports client html file corresponding with network side side carries out
It compares, judges whether network side has the update file of the html file.
File identification mentioned here can then be assigned for uniquely tagged html file once html file has update file
It gives a new file identification and gives update file.File identification can be generated and assigned to different html files by system,
It can be by the file identification of the different html file of programmer's self-defining as needed.
102, client receives the offline render instruction that server issues.
If the html file that network side does not update, client is in the file identification for reporting html file to server
Afterwards, it will receive the offline render instruction that server issues.The instruction generally includes the type or property of the operation to be completed, such as reads
Access according to, make addition and subtraction or output data etc., be also used to indicate the position of operation object.Offline render instruction in the present embodiment
In addition to instruction client reads data for being also used to indicate to client from where and reading the data other than rendering webpage.
103, client reads the html file stored in local data base according to offline render instruction.
After client receives the offline render instruction that server issues, parsing is completed to instruction and according in instruction
Content executes relevant operation.In the present embodiment, HTML that client can be stored from local data base according to offline render instruction
The html file of needs is read in file.This process read be according to the file identification of html file in the local database
Corresponding html file is found, i.e. the identical html file of reading file identification.
Local data base mentioned here is independently of server, and not by the shadow of the factors such as network environment or network bandwidth
It rings.The local data base is hewed out in local storage (such as local hard drive or local memory) exclusively for corresponding client
One piece of independent memory space can only store corresponding data information for the client, other client lacks of competence read the visitor
Data information in the local data base at family end.The client can be under off-line state to the data in own local database
Information, which is increased, deleted and retrieved etc., to be managed and controlled.Data information in the local data base does not repeat usually, data
Structure not only can guarantee the correctness of data but also can prevent the abnormal interaction between different clients from making independently of other clients
With.
104, client renders webpage according to the html file of reading.
After client reads the identical html file of file identification from local data base, start according to html file
Webpage is rendered.Html file marks the various pieces in webpage to be shown by label symbol.Such as HTML text
Record has label symbol in part<html>with</html>, respectively indicate the beginning and end of this document;Label symbol<head>and
</head>respectively indicate the beginning and end of file header;Label symbol<body>with</body>respectively indicate text
Beginning and end.Client to the rendering of webpage is explained and shows by way of reading the label symbol in html file
Its content marked will not indicate its mistake to the label for writing error, and does not stop it and explain implementation procedure, and programmer can only
Error reason and error position are analyzed by display effect.Corresponding different client, might have same label symbol
Not exactly the same explanation, thus the webpage of its rendering might have different display effects.
The method of webpage provided in an embodiment of the present invention rendering, can by server according to the file identification of html file into
The mode that row compares, judges whether network side has the update file of the html file, in the case where no update file, client
The offline render instruction that can be issued according to server is held to read the html file stored before this from local data base, thus right
Webpage is rendered.Compared with prior art, HTML text all is obtained from server when the present invention can be avoided rendering webpage every time
Part can make client off-line render webpage in the case where html file does not update.Due to being not necessarily to server
The data of html file are requested, therefore the speed of webpage rendering is not limited by network bandwidth or server handling ability, it can be with
The speed of webpage rendering is greatly improved.
Further, it corresponds to the above method, the embodiment of the present invention also provides a kind of method of webpage rendering, the party
Method is mainly used for server-side, to echo with the method for above-mentioned client-side.As shown in Fig. 2, this method comprises:
201, server receives the file identification for the hypertext markup language html file that client reports.
Client carry out webpage rendering when, client need to obtain the html file of related web page and to html file into
Row is explained, to complete the rendering to webpage, web displaying is made to go out complete content.In the prior art, since html file is logical
It is often stored in server hard disc, therefore client obtains html file and just must remotely be obtained by way of transport protocol,
This process will receive the limitation of network bandwidth or server handling ability.
In embodiments of the present invention, the step 101 in corresponding above-mentioned client-side method, when carrying out webpage rendering,
Server can first receive the file identification for the html file that client reports, so as to server by this document identify and network side
The file identification of corresponding html file be compared, judge whether network side has the update file of the html file.
202, server judges whether received file identification is identical as the file identification of the newest html file of network side.
Since a file identification uniquely indicates a html file, if html file has update file, after updating
Html file can regain a new file identification, therefore server can be judged by way of comparing file identification
Whether html file has update file, if the file identification of corresponding html file is identical, client need not be from server
The html file is obtained, server process resource can be saved in this way, improves the speed for obtaining html file.If corresponding HTML
The file identification of file is different, then client obtains the newest html file from server.
203, server issues offline render instruction to client.
After received file identification is compared server with the file identification of the newest html file of network side, if connecing
The file identification of receipts is identical as the file identification of the newest html file of network side, then client can be corresponding from obtaining elsewhere
Html file.At this point, server can indicate the subsequent acquisition operation of client executing.In the actual process, server can
To issue offline render instruction to client, which is used to indicate the HTML text that client obtains needs from local data base
Part is for rendering webpage.
The method of webpage provided in an embodiment of the present invention rendering, can by server according to the file identification of html file into
The mode that row compares, judges whether network side has the update file of the html file, in the case where no update file, client
The offline render instruction that can be issued according to server is held to read the html file stored before this from local data base, thus right
Webpage is rendered.Compared with prior art, HTML text all is obtained from server when the present invention can be avoided rendering webpage every time
Part can make client off-line render webpage in the case where html file does not update.Due to being not necessarily to server
The data of html file are requested, therefore the speed of webpage rendering is not limited by network bandwidth or server handling ability, it can be with
The speed of webpage rendering is greatly improved.
Further, as method and server-side to above-mentioned client-side method refinement and extension, this
Embodiment is described in detail as follows for the different situations in implementation process.Client in following examples is browser,
Html file is HTML5 file, and local data base is the WebSQL database based on HTML5.WebSQL database is to browse
JS file can be used to operate structured query language (Structured Query Language, letter in device simulated database
Claim SQL) read-write of complete paired data.WebSQL storage space of database is big, can not only be to simple key value or simple object
(such as application program setting or Application Status) is stored, and storage organization is free, while can also be to trifling number
It is handled according to relationship, is highly suitable as the database being locally stored.It is of course also possible to using Webstorage or
Localstorage as local data base, the present embodiment to this with no restriction.
In the actual process, browser may repeat to open certain webpages, these webpages are usually all deposited as caching
Storage is in local data base WebSQL.But browser can also open some new web pages not accessed before, as browser head
When secondary some webpage of opening, the html file information of the webpage will not be stored in local WebSQL database.Browser at this time
The html file can only be obtained from server, which could be rendered.Therefore, server is initially opened certain in browser
The html file directly can be issued to browser when a webpage, browser stores it in local after receiving the html file
WebSQL database in, the HTML can be read when rendering the webpage again so that browser is subsequent from WebSQL database
File, without being obtained to server side.
When browser is again turned on some webpage, when being stored with last rendering webpage in local WebSQL database
Html file, since the html file is possible to carry out update, browser is obtained there are two types of the sources of html file,
One is obtaining from server side, one is obtain from local WebSQL database.At this point, browser can be according to service
The instruction of device obtains html file.Therefore browser can first report the file identification of the html file to server, for service
This document is identified and is compared with the file identification of the newest html file of the webpage of network side by device, judges the html file
Whether update file is had.If file identification is different, illustrate that the html file has been updated, server issues this to browser
The update file of html file, browser render webpage according to the update file.If file identification is identical, illustrate
The secondary html file for rendering the webpage can also continue to using browser can obtain HTML text from WebSQL database
Part.At this point, the browser offline render instruction that server issues based on the received reads HTML text from WebSQL database
Part.
The newest html file of the webpage of the file identification that browser reports and network side is judged in above-mentioned server
In the different situation of file identification, step 204 server can be executed after above-mentioned steps 202 and issue HTML to client
The update file of file, browser receive the update file for the html file that server issues in addition to for rendering webpage
Outside, it is also necessary to be stored in local WebSQL database.Here there are two kinds of situations for storage, and one is retain original HTML text
The storage of part, one is the storages for covering former html file, i.e., are replaced former html file, only retain in database newest
Html file.
When using the storage mode for retaining former html file, it is necessary to the new oldState of html file is distinguished,
It can may determine that the new oldState of html file by time order and function by the way of adding timestamp at this time.According to this
Kind storage mode, it is necessary to discharge the data in WebSQL database, over time so that WebSQL database can accommodate
More new datas.Certainly, it is also to discharge legacy data according to the timestamp of data when discharging data, retains newest number
According to.
When using the storage mode for covering former html file, the update file of html file can replace WebSQL data
Old html file in library only retains some webpage or a newest HTML text of certain class same web page in WebSQL database
Part.When being replaced preservation, the file of a unit smaller than update file can be replaced according to the ID independent increment of file,
Storing in WebSQL database so is all exactly the newest html file of webpage.Illustratively, if last rendering Taobao
The HTML-TB3 file in WebSQL database is used when homepage, after Taobao's homepage carries out correcting, browser renders net
Newest HTML-TB4 file is got when page, HTML-TB3 text can be override automatically when being saved HTML-TB4 file
Part makes only to retain newest HTML-TB4 file in WebSQL database.
Above-mentioned html file have update file when, update degree can also have a variety of situations, some files update compared with
It is more, and the update of some files is less.In practical applications, webpage html file can only update in a small amount in most cases, such as
In file in the change of a Codabar code or file search box block change.When these are changed lesser update file by server
When being all handed down to browser, the sub-fraction file fragment only changed to play a crucial role in entire file, for this
File more news in a small amount, can be handled in such a way that html file is divided into different blocks.
It in practical applications, can be different blocks according to function and Type division by the content of entire html file,
Such as search column block, picture block, text block, window block and toolbar block.Each block has a HTML text
Part segment, correspondingly, these html file segments can also be endowed a mark, referred to as HTML fragment is identified.Here HTML
Fragment identification is for distinguishing different html file pieces as the effect of the file identification of above-mentioned html file and property
Section, i.e. different blocks in differentiation webpage.
When html file, which has, updates file, the text on the correspondence netpage search column in html file may be only had updated
Part segment.Therefore, as the above-mentioned mode for handling entire html file as a whole, when browser is to service
After device reports the HTML fragment of each block of webpage to identify, the HTML fragment that server reports these is identified and network side
HTML fragment mark is compared, it is found that only one HTML fragment mark changes, this HTML fragment changed mark
Corresponding is exactly the update file fragment on netpage search column.The html file segment of update is only handed down to browsing by server
Device, other html file segments not updated can be obtained from WebSQL database.
Browser is when rendering webpage, in addition to mainly explaining to html file, it is also necessary to utilize CSS file
And/or JS file makes webpage that richer layout architecture and/or human-computer interaction function be presented.As html file, CSS file
It also will be updated with JS file, update status is similar with the update status of above-mentioned html file, can also there is a small amount of update.Equally
, browser to server in addition to that can report the file identification of entire CSS file or the file identification of entire JS file, for clothes
When business device judges whether these files have update file, browser can also report each code in CSS file or JS file
The code snippet of segment identifies, so that server judges whether network side has the more new film of code snippet according to code snippet mark
Section.If these code snippets mark changes, server issues the more new segment of code snippet to browser.
In practical applications, if html file, CSS file and JS file etc. have, when updating file, server can divide
The update file for not issuing different class files to browser, causes the number issued more.Therefore, based on this several class file in generation
The characteristics of some formats in code editing process, the present embodiment can by CSS file and/or JS file (CSS update file and/
Or JS updates file) it edits in the update file of html file, it forms Embedded HTML and updates file, in this way in server
When issuing HTML update file, so that it may disposably issue CSS file and/or JS file together, reduce and send the documents under server
The number of part.Illustratively, when being embedded in an external JS script file in html file, it can use HTML<script>mark
Label are inserted into one section of JS:<script type=" text/javascript ">document.write in html page
("Hello World!")</script>.
Certainly, being embedded in html file can be entire CSS file and/or entire JS file, be also possible to CSS file
And/or the code snippet in JS file, the HTML that server issues, which updates, may include CSS and/or JS update file in file,
Also CSS and/or JS more new segment be may include.
Above-mentioned file identification, code snippet mark and HTML fragment mark include but is not limited to timestamp, fileversion number,
The distribution of file key assignments, identity ID and MD5, either system or programming personnel are according to the mark of programming rule self-defining
Know, as long as the files such as HTML, CSS, JS, file fragment and code snippet can be represented uniquely.
Html file is divided into different blocks and is reported and issued by the embodiment of the present invention, so that server only issues
The more new segment of html file can be substantially reduced the data volume that server issues, while can be by CSS file and/or JS file
It is issued together in (file fragment or code snippet) write-in html file, the number that server issues can be substantially reduced, these realities
The mode of applying can rationally utilize the process resource of server, improve the speed of webpage rendering.
Further, as an implementation of the above method, the embodiment of the invention also provides a kind of webpage rendering device,
The device is usually located at client, or has data interaction relationship independently of client but between client, on realizing
State method.As shown in figure 3, the device includes: reporting unit 31, receiving unit 32, reading unit 33 and processing unit 34,
In,
Reporting unit 31, for reporting hypertext markup language html file to server when carrying out webpage rendering
File identification, so that server judges whether network side has the update file of html file according to file identification;
Receiving unit 32, for judging that network side does not have HTML according to the file identification that reporting unit 31 reports when server
When the update file of file, the offline render instruction that server issues is received;
Reading unit 33 stores in local data base for being read according to the received offline render instruction of receiving unit 32
Html file;
Processing unit 34, the html file for being read according to reading unit 33 render webpage.
Further, the device further include:
Storage unit 35;
The receiving unit 32 is also used to when being rendered for the first time to webpage, receives the html file that server issues;
The storage unit 35 is used for the received html file of receiving unit 32 storage to local data base.
Further, which is used for when server judges that network side has the update file of html file, connects
Receive the update file for the html file that server issues;
The processing unit 34 is for rendering webpage according to the received update file of receiving unit 32.
Further, which is used to receive the update text for the html file that server issues in receiving unit 32
After part, the html file in local data base is replaced according to file is updated.
Further, which is also used to report the HTML fragment of html file segment to identify.
Further, which is also used to report code piece in cascading style list CSS and/or scripting language JS
The code snippet mark of section, so that server judges whether network side has the more new film of code snippet according to code snippet mark
Section;
The receiving unit 32 is also used to when server judges that network side has the more new segment of code snippet, receives server
The more new segment issued.
Further, which is also used to read CSS and/or JS from the received update file of receiving unit 32
More new segment.
The device of webpage provided in an embodiment of the present invention rendering, can by server according to the file identification of html file into
The mode that row compares, judges whether network side has the update file of the html file, in the case where no update file, client
The offline render instruction that can be issued according to server is held to read the html file stored before this from local data base, thus right
Webpage is rendered.Compared with prior art, HTML text all is obtained from server when the present invention can be avoided rendering webpage every time
Part can make client off-line render webpage in the case where html file does not update.Due to being not necessarily to server
The data of html file are requested, therefore the speed of webpage rendering is not limited by network bandwidth or server handling ability, it can be with
The speed of webpage rendering is greatly improved.
It is reported and is issued in addition, html file is divided into different blocks by the embodiment of the present invention, so that server
The more new segment for only issuing html file, can be substantially reduced the data volume that server issues, at the same can by CSS file and/or
It is issued together in JS file (file fragment or code snippet) write-in html file, the number that server issues can be substantially reduced,
These embodiments can rationally utilize the process resource of server, improve the speed of webpage rendering.
Further, as an implementation of the above method, corresponding to the above device, the embodiment of the invention also provides
A kind of device of webpage rendering, which is usually located at server, or has data independently of server but between server
Interactive relation, to realize the above method.As shown in figure 4, the device includes: receiving unit 41, judging unit 42 and issues
Unit 43, wherein
Receiving unit 41, for receiving the hypertext markup language that client reports when client carries out webpage rendering
The file identification of html file;
Judging unit 42, for judging the file of the received file identification of receiving unit 41 Yu the newest html file of network side
It identifies whether identical;
Issuance unit 43, for judging the text of received file identification Yu the newest html file of network side when judging unit 42
When part mark is identical, offline render instruction is issued to client, indicates client according to the html file pair in local data base
Webpage is rendered.
Further, which is used for when client renders webpage for the first time, issues to client
Html file, so that client stores html file to local data base.
Further, which is used to judge that network side has the update file of html file when judging unit 42
When, the update file of html file is issued to client, and webpage is rendered so that client updates file based on the received.
Further, which is also used to receive the HTML fragment mark of html file segment.
Further, which is also used to receive the cascading style list CSS and/or script language that client reports
Say the code snippet mark of code snippet in JS;
The judging unit 42, which is also used to be identified according to the received code snippet of receiving unit 41, judges whether network side has generation
The more new segment of chip segment;
The issuance unit 43 is also used to when judging unit 42 judges that network side has the more new segment of code snippet, to client
End issues more new segment.
Further, the device further include:
Writing unit 44 updates in file for the more new segment of CSS and/or JS to be written to;
The issuance unit 43 is used to issue the update that the more new segment of CSS and/or JS is written in writing unit 44 to client
File.
The device of webpage provided in an embodiment of the present invention rendering, can by server according to the file identification of html file into
The mode that row compares, judges whether network side has the update file of the html file, in the case where no update file, client
The offline render instruction that can be issued according to server is held to read the html file stored before this from local data base, thus right
Webpage is rendered.Compared with prior art, HTML text all is obtained from server when the present invention can be avoided rendering webpage every time
Part can make client off-line render webpage in the case where html file does not update.Due to being not necessarily to server
The data of html file are requested, therefore the speed of webpage rendering is not limited by network bandwidth or server handling ability, it can be with
The speed of webpage rendering is greatly improved.
It is reported and is issued in addition, html file is divided into different blocks by the embodiment of the present invention, so that server
The more new segment for only issuing html file, can be substantially reduced the data volume that server issues, at the same can by CSS file and/or
It is issued together in JS file (file fragment or code snippet) write-in html file, the number that server issues can be substantially reduced,
These embodiments can rationally utilize the process resource of server, improve the speed of webpage rendering.
Further, as an implementation of the above method and the application of above-mentioned apparatus, as shown in figure 5, the present invention is implemented
Example additionally provides a kind of system of webpage rendering, which includes client 51 and server 52.Wherein, client 51 includes
Device shown in Fig. 3 in embodiment, server 52 include device shown in Fig. 4 in embodiment.
The system of webpage provided in an embodiment of the present invention rendering, can by server according to the file identification of html file into
The mode that row compares, judges whether network side has the update file of the html file, in the case where no update file, client
The offline render instruction that can be issued according to server is held to read the html file stored before this from local data base, thus right
Webpage is rendered.Compared with prior art, HTML text all is obtained from server when the present invention can be avoided rendering webpage every time
Part can make client off-line render webpage in the case where html file does not update.Due to being not necessarily to server
The data of html file are requested, therefore the speed of webpage rendering is not limited by network bandwidth or server handling ability, it can be with
The speed of webpage rendering is greatly improved.
It is reported and is issued in addition, html file is divided into different blocks by the embodiment of the present invention, so that server
The more new segment for only issuing html file, can be substantially reduced the data volume that server issues, at the same can by CSS file and/or
It is issued together in JS file (file fragment or code snippet) write-in html file, the number that server issues can be substantially reduced,
These embodiments can rationally utilize the process resource of server, improve the speed of webpage rendering.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, reference can be made to the related descriptions of other embodiments.
It is understood that the correlated characteristic in the above method and device can be referred to mutually.In addition, in above-described embodiment
" first ", " second " etc. be and not represent the superiority and inferiority of each embodiment for distinguishing each embodiment.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
Algorithm and display are not inherently related to any particular computer, virtual system, or other device provided herein.
Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of system
Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various
Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hair
Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention
Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects,
Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect
Shield the present invention claims features more more than feature expressly recited in each claim.More precisely, as following
Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore,
Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself
All as a separate embodiment of the present invention.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment
Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment
Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or
Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any
Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed
All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power
Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose
It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed
Meaning one of can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors
Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice
Microprocessor or digital signal processor (DSP) realize the denomination of invention according to an embodiment of the present invention (as determined in website
The device of Hyperlink rank) in some or all components some or all functions.The present invention is also implemented as being used for
Some or all device or device programs of method as described herein are executed (for example, computer program and calculating
Machine program product).It is such to realize that program of the invention can store on a computer-readable medium, or can have one
Or the form of multiple signals.Such signal can be downloaded from an internet website to obtain, or be provided on the carrier signal,
Or it is provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability
Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not
Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such
Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real
It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch
To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame
Claim.