A kind of web page joint update method
Technical field
The present invention relates to a kind of WEB page update method, especially a kind of web page joint update method.
Background technology
Along with the development of internet technique, the popularity of network is more and more higher, and website have also been obtained significant progress as the main contents supplier of internet. Website is no longer satisfied with the content only providing unified standard but wish can be more with user interaction and then can realize by the demand offer content service of user.
Usually, the action of webpage is undertaken by page furbishing, is singly that refresh page causes user to browse frequently to be interrupted frequently, and makes user feel ophthalmic uncomfortable. For this problem, provide the more new paragon of not refresh page based on the Replace method of JavaScript, but this mode also has problems. Due to Replace method not refresh page, also it is exactly the page is not organized again, but upgrade on the existing page, this just causes once more new data occurs crossing such as data in long or data and there are the abnormal conditions such as sensitivity symbol, local or whole page form can be caused to collapse and then make user interface chaotic, it may also be useful to family cannot normal browsing.
Summary of the invention
For existing webpage the problems referred to above that more new paragon exists, the present invention provides a kind of and is intended to avoid the page form web page joint update method of collapse may occur when upgrading.
The technical scheme that technical solution problem of the present invention adopts is:
A kind of web page joint update method, wherein, comprises service end and the client terminal for showing hypertext document, and described client terminal is connected with described service end by communication medium, specifically comprises the steps;
Step a, described service end organize Hypertext DOM node more new data according to the update request of described client terminal;
Step b, described service end are sent to described client terminal after organizing complete node updates data to encapsulate with HTML annotation symbol;
Step c, described client terminal accept the more new data of described service end transmission with the browser based on hyper text protocol;
Steps d, described client terminal resolve described in more new data and the DOM node that described more new data is corresponding is upgraded.
Above-mentioned web page joint update method, wherein, described client terminal is by more new data described in embedding the script of hypertext document and resolving.
Above-mentioned web page joint update method, wherein, described client terminal upgrades described DOM node by embedding the script of hypertext document.
Above-mentioned web page joint update method, wherein, described service end comprises request and judges module, and described request judges that described client terminal is proposed update request and judges by module, and the exception request determined is returned described client terminal.
The invention has the beneficial effects as follows:
Adopt Hypertext annotation symbol to encapsulate more new data, when making browser-interpreted hypertext document will more new data as annotation process, even if more new data occurs abnormal also to have influence on page form.
Accompanying drawing explanation
Fig. 1 is the FB(flow block) of a kind of web page joint update method of the present invention.
Embodiment
Below in conjunction with the drawings and specific embodiments, the invention will be further described, but not as limiting to the invention.
As shown in Figure 1, a kind of web page joint update method of the present invention, wherein, comprises service end and the client terminal for showing hypertext document, and client terminal is connected with service end by communication medium, specifically comprises the steps;
Step a, service end organize Hypertext DOM node more new data according to the update request of client terminal;
Step b, service end are sent to client terminal after organizing complete node updates data to encapsulate with HTML annotation symbol;
Step c, client terminal accept the more new data of service end transmission with the browser based on hyper text protocol;
Steps d, client terminal resolve more new data and the DOM node that more new data is corresponding is upgraded, wherein client terminal resolves more new data by embedding the script of hypertext document, and upgrading DOM node by embedding the script of hypertext document, script can be formed by the script of JavaScript or other script language compilation.
Owing to more new data is encapsulated by Hypertext annotation symbol, it can not be shown by browser, therefore avoids because the more abnormal user interface caused of new data is chaotic. And then after being resolved by script, utilize the Replace method to be upgraded by each DOM node of hypertext document, the page furbishing avoided, it is to increase the continuity that user browses.
Further, wherein, service end comprises request and judges module, request judges that client terminal is proposed update request and judges by module, and the exception request determined is returned client terminal, can upgrade in the exception that service end advanced processing may produce like this, reduce more new data further and abnormal possibility occurs.
The foregoing is only preferred embodiment of the present invention; not thereby the claim of the present invention is limited; so equivalent structure change done by all utilizations specification sheets of the present invention and diagramatic content and the usual means of those skilled in the art are replaced, all it is included in protection scope of the present invention.