Background technology
Referring to Fig. 1, for carrying out the method flow of web page access in the prior art web application, this method specifically comprises:
When needs carried out data access, terminal sent request of access by browser to network side, comprised uniform resource locator to be visited (URL, Uniform Resource Locator) address in this request of access; Then, the data of the webpage that network side will be corresponding with described URL address to be visited send client to, and client is carried out the page in this locality by browser and showed.
Adopt existing web page access scheme, when each same webpage to network side conducted interviews, the browser of terminal all will carry out repetitive operation, and to obtain the data of this webpage, this has increased the burden of Internet resources.
The existing technology that a widget occurred generating at a certain webpage, this widget is an applicating text, can be the form of text, as the txt text, but also can be execution contexts, as the exe text.Terminal is carried out this widget, just can show the content of webpage; According to the difference of widget form, widget will carry out on the different platform of terminal, for example, when widget is the exe text, carry out on terminal system; For another example, when widget is the txt text, on terminal txt application platform, carry out.
At present, also do not adopt the widget technology to carry out the concrete scheme of web page access, if can realize web page access by the widget technology, terminal is carried out after the first time visit a certain webpage, when visiting next time, need not to obtain from network side again the data of this webpage, just can reduce the burden of Internet resources.
Summary of the invention
The invention provides a kind of method by little realization web application, this method can reduce the burden of Internet resources.
The invention provides a kind of system by little realization web application, this system can reduce the burden of Internet resources.
A kind of by little method that realizes web application, in this method, network side generates a widget for each webpage, the URL address storage widget separately of corresponding each webpage, Widget and its webpage one to one all adopt same URL to conduct interviews or call, and this method comprises:
Terminal is obtained uniform resource locator URL address to be visited;
Terminal sends the request of access comprise described URL address to be visited to network side;
Network side receives described request of access, inquires and the described corresponding widget in URL address to be visited, and the widget that inquires is fed back to terminal;
The widget that terminal received and preserved the network side feedback moves this widget.
A kind of by little system that realizes web application, this system comprises terminal device and network side;
Described network side, corresponding each webpage generates a widget, the URL address of corresponding each webpage storage little widget separately in the network side storing pond;
Described terminal device obtains uniform resource locator URL address to be visited, sends the request of access comprise described URL address to be visited to network side; Receive the widget of network side feedback, move this widget;
Described network side receives described request of access, inquires the corresponding widget in URL address that comprises with request of access from the network side storing pond, feeds back to terminal device.
From such scheme as can be seen, corresponding each webpage of the present invention generates a widget, the URL address storage widget separately of corresponding each webpage, when terminal conducts interviews to the webpage of network side: send the request of access that comprises URL address to be visited to network side, obtain corresponding widget from network side by the URL address; Then, the widget that terminal received and preserved the network side feedback moves this widget, just can show the content of this webpage to be visited.Like this, terminal is carried out a certain webpage after the visit first time, directly moves the local corresponding widget that preserves when visit next time, just the content that can show this webpage to be visited, and need not to visit this webpage from network side once more, thereby, reduced the burden of Internet resources.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, below in conjunction with embodiment and accompanying drawing, the present invention is described in more detail.
Corresponding each webpage of the present invention generates a widget, the URL address storage widget separately of corresponding each webpage, Widget and its webpage one to one all adopt same URL to conduct interviews or call, when terminal conducted interviews to the webpage of network side, the URL address by webpage to be visited obtained corresponding widget from network side; Then, terminal is carried out the widget that obtains, the content that just can show webpage to be visited.Like this, terminal is carried out a certain webpage after the visit first time, directly moves the local corresponding widget that preserves when visiting next time, just the content that can show this webpage to be visited, and need not to visit this webpage from network side once more, thereby, reduced the burden of Internet resources.
For a certain webpage generates corresponding Widget, be existing technology.Below Widget is carried out simple declaration.
For each webpage, or a plurality of webpages, or whole website, can be its clientization, and realize its inner logic, interior perhaps function on certain client software application platform or on the operating system, the application of this clientization is called Widget uses, Widget is can be at the widget of client terminal local operation in order to what substitute some function of website.
Widget has following characteristics:
Widget is the substituting little application of certain webpage, and it is suitable for certain application platform or operating system, and it has certain client terminal local operation characteristic, and depends on some characteristic of client, such as screen or client end capacity etc.; The substituting widget of same webpage or website can be various, and promptly certain different mobile phone terminal may need to run different widget, also is that the widget of same website can have a plurality of versions because of the difference of destination client.There is multiple implementation in the concrete compiling procedure of Widget, generally speaking needs to develop again according to destination client application platform or operating system.
Among the present invention, terminal can be that interface accessing carries out web page access to obtain data with URL, below by Fig. 2 the present invention program is elaborated.
Referring to Fig. 2, be the method flow diagram of the present invention by widget realization web application, this method may further comprise the steps:
Step 201, terminal are obtained URL address to be visited.
In this step, the URL address to be visited that terminal is obtained can be: the URL address to be visited by user's input that the browser of terminal receives.
Step 202, terminal send the request of access comprise described URL address to be visited to network side.
Step 203, network side receives described request of access, and whether inquiry has stored the corresponding widget in URL address that comprises with request of access, if, the corresponding widget in URL address that comprises with request of access that then obtains storage feeds back to terminal with the widget that obtains.
Step 204, terminal receives and preserves the widget of network side feedback.
Alternatively, this step also comprises: the corresponding URL of terminal stores the widget of described feedback in the address.Like this, when conducting interviews afterwards, terminal just can directly be obtained corresponding widget according to URL address to be visited in this locality, obtain again and need not network side.
Step 205, this widget of terminal operating.
Move this widget, but the just data of displayed web page.
In the prior art, after a certain webpage of application server side, if on this webpage link is arranged, by clicking this link, browser comprises the request of access of this link URL address to the application server transmission by browser access; After application server receives this request of access, the data of the webpage of this link URL address correspondence are sent to browser, the data of the webpage that browser-presented receives.As Fig. 3 A, show browser access webpage 1 in the prior art, again by webpage 1 accessed web page 2, then pass through the situation of webpage 2 accessed web pages 3, just, on the webpage 1 relevant for the link of the URL address of webpage 2, on the webpage 2 relevant for the link of the URL address of webpage 3.
Among the present invention, can be in the local visit that realizes between the webpage of terminal.
Particularly, behind the step 205 operation widget, to show the class webpage, link is also arranged on the class webpage, the user clicks the link of selection, terminal receives just that the user clicks comprises dereference request about the URL address of this link, and here, URL address that will each link on the class webpage be called indirect URL address; So-called class webpage is the web page class that provides with network side like or identical webpage.After terminal receives the dereference request,,, then move the widget that inquires if inquire at the corresponding widget in indirect URL address that local search and dereference request comprise; If do not inquire, then terminal sends the request of access that comprises described indirect URL address to network side; Network side receives described request of access, inquires the corresponding widget in address with described indirect URL, feeds back to terminal; The widget that terminal receives and the operational network side is fed back.Fig. 3 B is an an example of the present invention, and Fig. 3 B is corresponding with Fig. 3 A, terminal storage widget1 and widget2, the corresponding webpage 1 of widget1, the corresponding webpage 2 of widget2; Fig. 3 C shows the detailed process that terminal realizes Fig. 3 B, it specifically comprises: the user comprises the request of access of URL1 to the terminal input by browser, the widget engine of terminal goes out the widget1 corresponding with URL1 at local search, and operation widget1 shows class webpage 1; The user clicks the link about webpage 2 on class webpage 1, correspondingly, the widget engine of terminal receives the dereference request that comprises URL2, and the widget engine of terminal goes out the widget2 corresponding with URL2 at local search, operation widget2 shows class webpage 2; The user clicks the link about webpage 3 on class webpage 2, correspondingly, the widget engine of terminal receives URL3, the widget engine of terminal is in the local search widget3 failure corresponding with URL3, send the request of access that comprises URL3 by browser to network side, obtain the data of webpage 3 from network side.Widget engine among Fig. 3 C is equivalent to the local widget administrative unit among Fig. 4, and the widget engine not only can also be managed widget according to the local corresponding widget that preserves of URL address lookup.
Referring to Fig. 4,, it is characterized in that this system comprises terminal device and network side for the system of the present invention by widget realization web application; The terminal of described terminal device Fig. 2 and Fig. 3 place record just.
Described network side, corresponding each webpage generates a widget, the URL address of corresponding each webpage storage widget separately in the network side storing pond;
Described terminal device obtains URL address to be visited, sends the request of access comprise described URL address to be visited to network side; Receive the widget of network side feedback, move this widget;
Described network side receives described request of access, inquires the corresponding widget in URL address that comprises with request of access from the network side storing pond, feeds back to terminal device.
Alternatively, described network side also comprises database of record, is used to store the recorded information about the widget that downloads to each terminal device.
Alternatively, described terminal device comprises browser, local storage pool and local widget administrative unit;
Described browser is used to receive the request of access that comprises URL address to be visited, sends to local widget administrative unit;
Described local widget administrative unit is used for sending the request of access comprise described URL address to be visited to network side, receives the widget of network side feedback, moves this widget.
Above-described specific embodiment; purpose of the present invention, technical scheme and beneficial effect are further described; institute is understood that; the above only is specific embodiments of the invention; and be not intended to limit the scope of the invention; within the spirit and principles in the present invention all, any modification of being made, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.