CN104423991B - Webpage, the method and device that web data is provided are loaded in mobile terminal - Google Patents

Webpage, the method and device that web data is provided are loaded in mobile terminal Download PDF

Info

Publication number
CN104423991B
CN104423991B CN201310394054.6A CN201310394054A CN104423991B CN 104423991 B CN104423991 B CN 104423991B CN 201310394054 A CN201310394054 A CN 201310394054A CN 104423991 B CN104423991 B CN 104423991B
Authority
CN
China
Prior art keywords
webpage
network address
view
request
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.)
Active
Application number
CN201310394054.6A
Other languages
Chinese (zh)
Other versions
CN104423991A (en
Inventor
徐凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201310394054.6A priority Critical patent/CN104423991B/en
Publication of CN104423991A publication Critical patent/CN104423991A/en
Priority to HK15105121.4A priority patent/HK1204689A1/en
Application granted granted Critical
Publication of CN104423991B publication Critical patent/CN104423991B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

This application discloses load webpage, the method and device for providing web data in mobile terminal, in a wherein method, during by mobile terminal accessing webpage, using identical network address during with accessing the webpage by immobile terminal, and the network address corresponds to same set of web data in server end, the method includes:After mobile terminal receives the request that the second webpage is accessed by the navigation entry in the first webpage, the address of browser address bar is rewritten as to the network address of second webpage, to trigger the address modification event of browser;In described address change event, network address based on second webpage, access request is sent to corresponding server, so that the server is according to the access request and the web data, generates second webpage data required when mobile terminal is shown and return;Second webpage is loaded according to the data that server returns.By the application, the cost during mobile can be saved.

Description

Webpage, the method and device that web data is provided are loaded in mobile terminal
Technical field
This application involves the web displaying technical field in mobile terminal, more particularly to mobile terminal load webpage, The method and device of web data is provided.
Background technology
It is well known that in the internet, typically using webpage as the tissue of various web page resources and show in the form of, in order to Each webpage can be distinguished, each webpage can have respectively unique mark, commonly referred to as network address.The network address of webpage is led to URL can often be used(Uniform Resource Locator, uniform resource locator)It represents, shaped like:<Agreement>://<It is main Machine>:<Port>/<Path>, etc..The URL of webpage is added in the address field of browser, it is possible to navigate to corresponding net Page.
With the fast development of development of Mobile Internet technology, people can anywhere or anytime by various mobile terminal devices come Internet is accessed, various information is obtained, can also webpage be browsed by browser dedicated in mobile terminal.But relatively For the terminal devices such as traditional desktop computer, notebook, the screen physical size of mobile terminal device generally can be smaller.Cause This, a similary webpage when being shown on a kind of terminal device, may carry out some to the content in webpage and delete, for example, The contents such as some advertisements will no longer be shown, etc..Also, a similary webpage, is complained to the higher authorities about an injustice and request fair settlement in the larger PC machine of screen physical size When asking, URL and when accessing on the mobile terminal device is usually different.For example, be equally the homepage of certain website, if To be accessed in PC machine, then the URL used is usually www.abc.com, and when accessing on mobile terminals, network address is M.abc.com, etc..Correspondingly, browser can also divide into PC editions and mobile terminal version.
Since same webpage is different with the URL scheme that is used on mobile terminal in PC machine, realizing webpage It during the mobile of access, needs to expend the costs such as larger network address, in addition may also can bring one to the access of webpage It is a little inconvenient.For example, it is assumed that certain user has shared certain webpage in PC machine using social tools such as its microbloggings, the network address of the webpage is It is represented with the URL scheme under PC machine, for example, www.abc.com;And other users can also using the microblogging of mobile phone version The webpage that the user shares is viewed, still, at this point, the network address due to webpage is www.abc.com, accordingly, it is possible to cause Can not directly be checked with the browser of mobile phone version, etc..
Invention content
This application provides webpage, the method and device for providing web data is loaded in mobile terminal, can save Cost during mobile.
This application provides following schemes:
A kind of method in mobile terminal loading webpage, during by mobile terminal accessing webpage, with passing through non-moving end Using identical network address when end accesses the webpage, and the network address corresponds to same set of web data, the method in server end Including:
After mobile terminal receives the request that the second webpage is accessed by the navigation entry in the first webpage, by browser The address on location column is rewritten as the network address of second webpage, to trigger the address modification event of browser;
In described address change event, based on the network address of second webpage, send to access to corresponding server and ask It asks, so that the server is according to the access request and the web data, generates second webpage in mobile terminal Required data and return during display;Wherein, second webpage data required when mobile terminal is shown are described second A part in webpage whole web data;
Second webpage is loaded according to the data that the server returns.
A kind of method that web data is provided to mobile terminal, during by mobile terminal accessing webpage, with passing through non-shifting Using identical network address during dynamic terminal access webpage, and the network address corresponds to same set of web data in server end, described Method includes:
Receive the web access requests that client is sent;
If the web access requests are access request, and are the requests sent out by mobile terminal, then according to institute The corresponding web data of the network address carried in web access requests is stated, generates the webpage data required when mobile terminal is shown, Wherein, the webpage data required when mobile terminal is shown are the part in the webpage whole web data;
Return to the webpage data required when mobile terminal is shown, loaded in terminal device so as to client described in Webpage.
The content of target webpage is split as the mesh by a kind of method in mobile terminal loading webpage in server end in advance First used when marking corresponding multiple views when webpage is shown on mobile terminals, and being accessed in immobile terminal with webpage Be respective second network address of each view generation according to preset mapping ruler based on network address, first network address with it is each Second network address corresponds to same set of web data in server end;In client, the method includes:
After receiving the request that user browses given view, sent and accessed to server according to the network address of the given view Request;
According to the data that server returns, the given view is loaded in current page, and in current page, provided The access control of other views;
When receiving the request for browsing a upper view or next view by the access control, in current page Load a upper view or next view.
The content of target webpage, is split as by a kind of method that web data is provided to mobile terminal in server end in advance The target webpage corresponding multiple views when showing on mobile terminals, and while being accessed in immobile terminal with webpage use Be respective second network address of each view generation according to preset mapping ruler based on first network address, first network address with Each second network address corresponds to same set of web data in server end;Wherein, the second network address of each view is described After hash or hashbang marks are added on the basis of the first network address that target webpage uses when being accessed in immobile terminal, then It is generated in addition for distinguishing the mark of each view, the method includes:
Receive the web access requests that client is sent;Wherein, if the browse request that client receives is to browse certain The request of view, then what is carried in the web access requests of client transmission is first network address;
If the web access requests are sent out by mobile terminal, by the corresponding whole nets of first network address Page data and the mapping ruler return to client, so that the client is according to the second net of the view of requested browsing Location and the mapping ruler, it is corresponding from the corresponding whole web datas of first network address to extract second network address Web data, and loaded in current page.
The content of target webpage, is split as by a kind of method that web data is provided to mobile terminal in server end in advance The target webpage corresponding multiple views when showing on mobile terminals, and while being accessed in immobile terminal with webpage use Be respective second network address of each view generation according to preset mapping ruler based on first network address, first network address with Each second network address corresponds to same set of web data in server end;Wherein, the network address of each view is in the target webpage Network address on the basis of add and generated for distinguishing the mark of each view, the method includes:
Receive the web access requests that client is sent;Wherein, refer to if the browse request that client receives is browsing Determine the request of view, then what is carried in the web access requests that client is sent is corresponding second network address of the given view;
The first network address is extracted from second network address, to determine the target webpage belonging to the given view;
According to the mapping ruler, the of the given view is extracted from the corresponding web data of first network address The corresponding viewdata of two network address simultaneously returns, so that client is according to the corresponding viewdata of the second network address of the given view Load the given view.
The content of target webpage, is split as by a kind of method that web data is provided to mobile terminal in server end in advance The target webpage corresponding multiple views when showing on mobile terminals, and while being accessed in immobile terminal with webpage use Be respective second network address of each view generation according to preset mapping ruler based on first network address, first network address with Each second network address corresponds to same set of web data in server end;Wherein, the network address of each view is in the target webpage Network address on the basis of add and generated for distinguishing the mark of each view, the method includes:
Receive the web access requests that client is sent;Wherein, refer to if the browse request that client receives is browsing Determine the request of view, then what is carried in the web access requests that client is sent is corresponding second network address of the given view;
The first network address is extracted from second network address, to determine the target webpage belonging to the given view;
The corresponding whole web datas of first network address and the mapping ruler are returned into client, so as to described Second network address and the mapping ruler of the client according to the view of requested browsing, from the corresponding whole of first network address The corresponding web data of second network address is extracted in web data, and is loaded in current page.
A kind of device in mobile terminal loading webpage, during by mobile terminal accessing webpage, with passing through non-moving end Using identical network address when end accesses the webpage, and the network address corresponds to same set of web data, described device in server end Including:
Unit is rewritten in address, and the second net is accessed by the navigation entry in the first webpage in the terminal for receiving After the request of page, the address of browser address bar is rewritten as to the network address of second webpage, to trigger the address of browser Change event;
Request unit, in described address change event, based on the network address of second webpage, to corresponding service Device sends access request, so that the server is according to the access request and the web data, generates second net The page data required when mobile terminal is shown and return;Wherein, second webpage number required when mobile terminal is shown According to for the part in the second webpage whole web data;
Loading unit, the data for being returned according to the server load second webpage.
A kind of device that web data is provided to mobile terminal, during by mobile terminal accessing webpage, with passing through non-shifting Using identical network address during dynamic terminal access webpage, and the network address corresponds to same set of web data in server end, described Device includes:
First access request receiving unit, for receiving the web access requests of client transmission;
First data generating unit if being access request for the web access requests, and is by mobile whole The request sent out is held, then according to the corresponding web data of the network address carried in the web access requests, generation webpage is in movement Terminal data required when showing, wherein, the webpage data required when mobile terminal is shown are the webpage whole net A part in page data;
First returning unit, for returning to the webpage data required when mobile terminal is shown, so that client exists The webpage is loaded in terminal device.
The content of target webpage is split as the mesh by a kind of device in mobile terminal loading webpage in server end in advance First used when marking corresponding multiple views when webpage is shown on mobile terminals, and being accessed in immobile terminal with webpage Be respective second network address of each view generation according to preset mapping ruler based on network address, first network address with it is each Second network address corresponds to same set of web data in server end;In client, described device includes:
Access request transmitting element, after the request that given view is browsed for receiving user, according to the given view Network address to server send access request;
View display unit for the data returned according to server, loads the given view in current page, and In current page, the access control of other views is provided;
View switch unit, for browsing asking for a upper view or next view when being received by the access control When asking, a view or next view are loaded in current page.
The content of target webpage, is split as by a kind of device that web data is provided to mobile terminal in server end in advance The target webpage corresponding multiple views when showing on mobile terminals, and while being accessed in immobile terminal with webpage use Be respective second network address of each view generation according to preset mapping ruler based on first network address, first network address with Each second network address corresponds to same set of web data in server end;Wherein, the second network address of each view is described After hash or hashbang marks are added on the basis of the first network address that target webpage uses when being accessed in immobile terminal, then It is generated in addition for distinguishing the mark of each view, described device includes:
Second access request receiving unit, for receiving the web access requests of client transmission;Wherein, if client The browse request received is to browse the request of certain view, then what is carried in the web access requests that client is sent is described the One network address;
Second returning unit, if sent out for the web access requests by mobile terminal, by described The corresponding whole web datas of one network address and the mapping ruler return to client, so that the client is according to requested Second network address of the view of browsing and the mapping ruler are extracted from the corresponding whole web datas of first network address The corresponding web data of second network address, and loaded in current page.
The content of target webpage, is split as by a kind of device that web data is provided to mobile terminal in server end in advance The target webpage corresponding multiple views when showing on mobile terminals, and while being accessed in immobile terminal with webpage use Be respective second network address of each view generation according to preset mapping ruler based on first network address, first network address with Each second network address corresponds to same set of web data in server end;Wherein, the network address of each view is in the target webpage Network address on the basis of add and generated for distinguishing the mark of each view, described device includes:
Third access request receiving unit, for receiving the web access requests of client transmission;Wherein, if client The browse request received is to browse the request of given view, then what is carried in the web access requests that client is sent is described Corresponding second network address of given view;
Network address extraction unit, for extracting the first network address from second network address, to determine the given view Affiliated target webpage;
Third returning unit, for according to the mapping ruler, being extracted from the corresponding web data of first network address Go out the corresponding viewdata of the second network address of the given view and return, so that client is according to the second of the given view The corresponding viewdata of network address loads the given view.
The content of target webpage, is split as by a kind of device that web data is provided to mobile terminal in server end in advance The target webpage corresponding multiple views when showing on mobile terminals, and while being accessed in immobile terminal with webpage use Be respective second network address of each view generation according to preset mapping ruler based on first network address, first network address with Each second network address corresponds to same set of web data in server end;Wherein, the network address of each view is in the target webpage Network address on the basis of add and generated for distinguishing the mark of each view, described device includes:
4th access request receiving unit, for receiving the web access requests of client transmission;Wherein, if client The browse request received is to browse the request of given view, then what is carried in the web access requests that client is sent is described Corresponding second network address of given view;
Network address extraction unit, for extracting the first network address from second network address, to determine the given view Affiliated target webpage;
4th returning unit, for the corresponding whole web datas of first network address and the mapping ruler to be returned To client, so as to second network address of the client according to the view of requested browsing and the mapping ruler, from described Extract the corresponding web data of second network address in the corresponding whole web datas of first network address, and in current page into Row loading.
According to the specific embodiment that the application provides, this application discloses following technique effects:
By the embodiment of the present application, same webpage can use identical network address side in mobile terminal with immobile terminal Case, it is not required that be individually for mobile terminal auto-building html files web data again, in this way, during mobile can be saved into This.That is, same webpage on mobile terminals may be not fully consistent with the content shown on immobile terminal (Because some contents extracted from webpage are shown on immobile terminal, what may be shown is only some pieces Section), still, the two can but go to initiate to access using identical URL.And what is redirected from a webpage to another webpage In the process, can load request be initiated by the code being written in current web page, avoids carrying out the page whole refreshing, improve the page Redirect speed;In addition, before being loaded, the network address of browser address bar can also be rewritten so that page furbishing Afterwards, the content that the page is shown is consistent with the network address shown in address field, and one can be generated in the access history of browser Record so that when user carries out the switching of webpage subsequently through the forward-reverse button of browser, can obtain correctly The page shows result.
In addition, for the more webpage of web page contents, another set of implementation is provided, it also i.e. will be in target webpage Appearance is split as corresponding multiple views when the target webpage is shown on mobile terminals, and provides for each view corresponding Network address in this way, just only showing one of view in each page of browser of mobile terminal, while can be shown in the view Show the button for being switched to other views, each view of entire webpage can be shown in a manner of similar lantern slide, simultaneously Realize the positioning to each view.
Certainly, any product for implementing the application does not necessarily require achieving all the advantages described above at the same time.
Description of the drawings
It in order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, below will be to institute in embodiment Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the application Example, for those of ordinary skill in the art, without creative efforts, can also obtain according to these attached drawings Obtain other attached drawings.
Fig. 1 is the flow chart of client approach provided by the embodiments of the present application;
Fig. 2 is the webpage schematic diagram in method provided by the embodiments of the present application;
Fig. 3 is the flow chart of server end first method provided by the embodiments of the present application;
Fig. 4 is the flow chart of another client approach provided by the embodiments of the present application;
Fig. 5 is another webpage schematic diagram in method provided by the embodiments of the present application;
Fig. 6 is another webpage schematic diagram in method provided by the embodiments of the present application;
Fig. 7 is the flow chart of server end second method provided by the embodiments of the present application;
Fig. 8 is the flow chart of server end third method provided by the embodiments of the present application;
Fig. 9 is the flow chart of server end fourth method provided by the embodiments of the present application;
Figure 10 is the schematic diagram of client terminal device provided by the embodiments of the present application;
Figure 11 is the schematic diagram of server end first device provided by the embodiments of the present application;
Figure 12 is the schematic diagram of another client terminal device provided by the embodiments of the present application;
Figure 13 is the schematic diagram of server end second device provided by the embodiments of the present application;
Figure 14 is the schematic diagram of server end 3rd device provided by the embodiments of the present application;
Figure 15 is the schematic diagram of the 4th device of server end provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, the technical solution in the embodiment of the present application is carried out clear, complete Site preparation describes, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, those of ordinary skill in the art's all other embodiments obtained belong to the application protection Range.
Embodiment one
In the embodiment of the present application one, for same webpage, for example, homepage of certain website etc., puts down in mobile terminal When being accessed on platform, it can use and immobile terminal platform(For example, PC)It is upper to access the same network address of phase, that is, can use Identical URL scheme, in this way, when server end preserves the data of each webpage, it may not be necessary to mobile terminal with it is non-moving Terminal distinguishes, and is traditionally used for providing the network address and data of the service of access to immobile terminal platform, can also be for movement Terminal platform uses.In this way, in the case where currently existing a large amount of immobile terminal webpage, it is only necessary in server end Carry out smaller change(Specific change can be described below), it is possible to it supports on mobile terminals to this webpage Access, therefore, can substantially reduce realize mobile cost.And due to the network address and immobile terminal on mobile terminal On network address it is identical, therefore, during user carries out cross-platform access, situations such as can not accessing can also be avoided the occurrence of. The specific implementation provided below the embodiment of the present application one is introduced in detail.
Referring to Fig. 1, the embodiment of the present application one provides a kind of method in mobile terminal displayed web page, in the method, As it was noted above, during by mobile terminal accessing target webpage, with accessing the target webpage by immobile terminal when uses Identical network address, and the network address corresponds to same set of web data in server end namely does not need to be mobile terminal webpage again In addition web data is generated, this method may comprise steps of:
S101:It, will be clear after mobile terminal receives the request that the second webpage is accessed by the navigation entry in the first webpage Looking at the address of device address field is rewritten as the network address of second webpage, to trigger the address modification event of browser;
Firstly the need of explanation, in the embodiment of the present application, after the browser for opening mobile terminal in user, pass through a little It hits the link of certain webpage or the modes such as address that certain webpage is directly inputted in address field accesses certain webpage, and the net of the webpage Location at PC ends(For ease of description, hereafter the example using PC machine as immobile terminal is introduced)It is used in browser Network address is identical, then browser of mobile terminal directly can generate web access requests according to the network address of the webpage and be sent to service Device, server is after access request is received, it can be determined that goes out the request from mobile terminal, therefore, can directly return to this The webpage web data required when mobile terminal is shown, the browser on mobile terminal can display it to user.
Above procedure can be regarded as common web page access process, and focusing on for the embodiment of the present application, work as display Go out after first webpage, if user also needs to access the second webpage under same site, can not need to page In the case that face carries out whole refreshing, redirecting between completion webpage.That is, during traditional web page access, if Another webpage B is jumped to from a webpage A, then needs to send the request for accessing webpage B to server again from browser, obtain Obtain the web data of webpage B(A usually html file)Later, whole refreshing is carried out to the page, shows that webpage B's is interior Hold.But in the process, it needs the data volume transmitted bigger, flow is expended in mobile terminal more sensitive In the case of, this web displaying mode seems not friendly enough, and the speed that webpage refreshes also can be slow.Therefore, at this Apply in embodiment, in the case where jumping to another webpage B from a webpage A, the mode of request may be used, to initiate to visit Ask request, the mode of this request will not trigger browser and the entirety of the page is refreshed, and can improve page layout switch speed.
In order to realize the access mode of request, the navigation entry of other pages can be provided a user in the first webpage, For example, be used as the navigation entry of a upper webpage or next webpage by arrow to up and down or left and right etc., etc..Certainly, Relationship between each webpage can be predefined well, that is, when the first current webpage is webpage B, preassign A upper webpage of webpage B is webpage A, and next webpage is webpage C, etc..Meanwhile JS generations can be added in the first webpage Code, when user initiates the request of access target webpage in the first webpage by navigation entry, which can lead to first Systematic difference Program Interfaces API etc. is crossed, the address of browser address bar is rewritten as to the network address of the second webpage, so as to Trigger the address modification event of browser.It is by the JS in webpage the purpose for the arrangement is that subsequently during making requests on Script initiates AJAX(Asynchronous JavaScript and XML, JavaScript and XML)Request, is returned in server It returns after page resource content, JS scripts carry out the switching of content of pages, and the process of page furbishing no longer passes through the wash with watercolours of browser Engine is contaminated to realize, AJAX request each time cannot all record in the access history of browser, this will cause following existing As:During user redirects from webpage A to webpage B, even if JS scripts show webpage B's in current page Content, but shown in the address field of browser be still webpage A address, at this point, if the user sees that after the content of webpage B Feel very interested, need current web page B saving as label(Namely it is added in the collection of browser), then it is actually added into Network address into collection is the network address of webpage A, because browser is the network address extracted from address field.In order to avoid this The generation of phenomenon, it is necessary first to be rewritten by the JS scripts in current web page to the network address in browser address bar, simultaneously also The address modification event of browser can be triggered, and then a record can be generated in the access history of browser, subsequently such as When fruit user needs to operate webpage by " advance " or " retrogressing " button on browser, could also it enter correct Webpage.
S102:In described address change event, based on the network address of second webpage, send and visit to corresponding server It asks request, so that the server is according to the access request and the web data, generates second webpage in movement Terminal data required when showing and return;Wherein, second webpage data required when mobile terminal is shown are described A part in second webpage whole web data;
After the address modification event of browser is triggered, it is possible in the event, based on the network address of the second webpage, to Corresponding server sends access request, and server is after this access request is received, it is possible to only will be in the second webpage Specific data return, without returning again to complete html file, that is to say, that server returned needs to show in the terminal A part for the data shown, only whole web datas, may be the Partial Fragment of the second webpage, for example, can in other words Energy be exactly one section of specific word, etc. or be the special data obtained after html file is removed end to end, etc. Deng.JS scripts in first webpage are after this data are got, it is possible to this data included in current page, it is real Now redirecting from the first webpage to the second webpage.
Can be advance it should be noted that needing which data shown when mobile terminal is shown about a webpage It provides, such as relevant rule etc. can be defined in the database, after the access request for receiving mobile terminal, just The webpage data required when mobile terminal is shown can be extracted from database according to rule.
S103:Second webpage is loaded according to the data that the server returns.
After the webpage data required when mobile terminal is shown are returned, client can load in terminal device The webpage.Certainly, due to initiation be load request, specifically when loading webpage, be not in a conventional manner by Browser loads webpage, but the data that the JS scripts by being written in webpage return to server end are included in the page In namely do not need to carry out the whole of the page to refresh.
In short, in the embodiment of the present application one, same webpage can use in mobile terminal with immobile terminal identical URL scheme, in this way, the cost during mobile can be saved.That is, same webpage on mobile terminals with non- The content shown on mobile terminal may be not fully consistent(It is extracted from webpage because being shown on immobile terminal Some contents, may display be only some segments), but the two can but go to initiate to access using identical URL.And And during being redirected from a webpage to another webpage, can initiate loading by the code being written in the first webpage please It asks, avoids carrying out the page whole refreshing, improve page jump speed;In addition, before being loaded, it can also be to browser The network address of address field is rewritten so that and after page furbishing, the content that the page is shown is consistent with the network address shown in address field, and A record can be generated in the access history of browser, so that forward-reverse button of the user subsequently through browser When carrying out the switching of webpage, the correct page can be obtained and show result.
In order to be better understood from technical solution provided by the embodiments of the present application, carried out below by a specific example detailed Thin introduction.
Referring to Fig. 2, wherein, situation of the left part for each webpage when being shown on immobile terminal, wherein/page1 ,/ Page2 ,/page3 represent the network address of each webpage respectively.In PC machine when being shown in immobile terminals browser, each page Include multiple page fragments(partial), in PC machine, the navigation between each webpage is jumped directly to generally by link Other pages.
And the situation that the right part in Fig. 2 is each webpage when showing on mobile terminals ,/page1 ,/page2 ,/ Page3 represents the network address of each webpage respectively, it is seen then that the network address of each webpage and the network address of each webpage of left part are identical 's.Certainly, for same webpage, page fragments that browser of mobile terminal can show that in window visual range PC browsers are generally less than, this is because the screen physical size of mobile terminal device is less than PC screens, mobile terminal User the modes such as can slide up and down by scroll bar or on the touchscreen and other segments in webpage are moved to browsing In the visual range of device window.Meanwhile it is shown respectively in each window shown in right side as it can be seen that on each webpage oriented Upper and downward arrow, this arrow just belong to the navigation entry in page, other nets can be loaded by clicking this navigation entry Page.Below by click/page2 to upward arrow for the jump procedure of webpage is introduced:
First, after user clicks the navigation button, the JS codes in webpage can use History-API to rewrite current browsing The address of device, but this will not trigger the whole of current page and refresh, but trigger the address modification event A of browser;
Then, in event A, the page fragments of server acquisition/page3 are removed by Ajax, then under current page Show partial-3-1.
In above process, for a user, browser address bar becomes/page3 really, but it is to pass through History-API readdressings, and/the Partial Fragment of page3 is loaded by Ajax, obtained effect can cause in this way The very big data volume that must reduce page loading on mobile browser, while also by the body of the access experience and application of the mobile page Testing becomes more consistent.
Embodiment two
Above example one is from client(Namely it is written to the JS scripts in the first webpage)Angle to the application implement The method in mobile terminal loading webpage that example provides is introduced in detail, in the following, in the embodiment two, it will from clothes The angle at business device end, is introduced the above method.Certainly, it in the embodiment two, equally has the characteristics that:By mobile whole When end accesses certain webpage, using identical network address during with accessing the webpage by immobile terminal, and the network address is in server The corresponding same set of web data in end.Compared with embodiment one, the angle only described is different, therefore, only introduces here The specific implementation of server end, others realize that details may refer to the record in embodiment one, and which is not described herein again.
Referring to Fig. 3, the embodiment of the present application two provides a kind of method that web data is provided to mobile terminal, and this method can To include the following steps:
S301:Receive the web access requests that client is sent;
Specifically, can be when needing to be switched to the second webpage from the first webpage, initiate to visit by user end to server It asks the request of the second webpage, mobile terminal identification can be carried in the request so that server end could be aware that the request comes From in mobile terminal.Meanwhile the request can be access request.
S302:If the web access requests are access request, and are the requests sent out by mobile terminal, then root According to the corresponding web data of network address carried in the web access requests, the generation webpage number required when mobile terminal is shown According to, wherein, the webpage data required when mobile terminal is shown are the part in the webpage whole web data;
Server end is after the web access requests of client are received, if it find that the request comes from mobile terminal, and It is an access request, it is possible to extracted from web data for the data required when mobile terminal is shown, these numbers According to the part for being webpage total data.
S303:The webpage data required when mobile terminal is shown are returned to, so that client adds in terminal device Carry the webpage.
After the webpage data required when mobile terminal is shown are returned, client can load in terminal device The webpage.Certainly, due to initiation be load request, specifically when loading webpage, be not in a conventional manner by Browser loads webpage, but the data that the JS scripts by being written in webpage return to server end are included in the page In namely do not need to carry out the whole of the page to refresh.
Embodiment three
In above-described embodiment one and embodiment two, the network address of the webpage used in mobile-terminal platform, with non-moving end The webpage network address used in the platform of end is identical, and the cost of webpage mobile is reduced with this.But in practical applications, may be used also It can there are situations below:The content included in certain webpages is very more, if all being shown in a page, When being browsed on mobile terminal, the slide that may pass through many times could browse, and the process slided has continuously Property, user need remember slide before had been observed where, then could be connected well with the content seen after slip On, it is more inconvenient.In addition, user may be only interested in a part of content in webpage, it is desirable to collect as bookmark, and wish When hoping the opening bookmark, this partial content can be immediately seen, still, if all the elements, all in a webpage, next time opens It after bookmark, can only be shown since the section start of webpage, user is also needed to by the modes such as sliding, dragging, to search oneself Real interested content, etc..
Therefore, in the present embodiment three, the content of target webpage can be split as the target webpage on mobile terminals Corresponding multiple views during display, and corresponding network address is provided for each view, in this way, in the every of browser of mobile terminal One of view is just only shown in a page, while can show the button for being switched to other views, entire net in the view Each view of page can be shown in a manner of similar lantern slide.Certainly, if it is each view split out again Completely new network address is distributed, then can cost be increased again, it therefore, in the embodiment of the present application, can be with webpage at non-moving end It is respective second net of each view generation according to preset mapping ruler based on the first network address used when being accessed in end Location.Can be automatically each the second network address of view generation thus it is possible, on the one hand, according to mapping ruler, on the other hand, but also Relationship between first network address of former webpage and the second network address of each view is more close, because being wrapped in the second network address of view The first network address containing former webpage, also allows for managing and inquire.Furthermore in this way it is also possible that the first network address of target webpage with it is each Second network address of a view corresponds to same set of web data in server end, although that is, a webpage has been split into multiple View, still, for server end, only fractionation in logic, web data still can only preserve portion, be not required to The corresponding data of each view individually to be preserved again respectively.In this way, there is a large amount of PC webpages in server end In the case of, can the display effect of single-page multiple view in the terminal be realized with minimum change.Below to this into Row is introduced in detail.
Referring to Fig. 4, the method in mobile terminal displayed web page that the embodiment of the present application three provides may comprise steps of:
S401:After receiving the request that user browses given view, sent out according to the network address of the given view to server Send access request;
S402:According to the data that server returns, the given view is loaded in current page, and in current page In, the access controls of other views is provided;
S403:When receiving the request for browsing a upper view or next view by the access control, current A upper view or next view are loaded in the page.
Due to being that each view has been individually created the second network address, user, can when mobile terminal browses webpage Some view individually to be selected to be browsed, in the page of browser, a view is shown every time, while in active view Access control is provided(Such as upward, downward arrow etc.), user can click access control and be switched to other views.In head Secondary some view of access(Namely the view does not come from the switching of other views)In the case of, server is receiving access Specific web data how is returned after request and what kind of processing is client carry out, it can be according to each the second network address of view Generating mode determine.
The generating mode of each the second network address of view is introduced first below.Under in one way in which, it may be used in URL Hash hashbang modes.For ease of understanding, hash and hashbang are simply introduced first.Assuming that URL: http://www.example.com#!123, character " # " therein is exactly that hash is identified, character " #!" it is hashbang marks. Hash is used primarily for carrying out anchor point in single page(anchor)Positioning, that is, # represents a position in webpage, it is right The character in face is exactly the identifier of the position.For the URL of previous example, " 123 " corresponding position is meant that in webpage, it is clear After device of looking at reads this URL, " 123 " position can be rolled to the visible area of window automatically.After but using hash, for It is had one disadvantage in that for webpage and is exactly, the crawler system of search engine can ignore " # " in URL in the webpage in capturing webpage Part later, that is to say, that this network address can not be admitted in the web page index library of search engine, also mean that user The corresponding webpage of this network address can not be searched by search engine.But some search engines are for using hashbang to identify Network address be friendly, that is to say, that the crawler system of search engine will not ignore hashbang mark after part, but The value of certain inquiry string is converted into, forms a new network address.Such as:Certain URL is:
http://twitter.com/#!/username
Crawler system is finding #!Later, character string " username " thereafter can be converted to inquiry string " _ The value of escaped_fragment_ ", and following network address is captured automatically:
http://twitter.com/?_escaped_fragment_=/username
As it can be seen that hashbang can regard the special circumstances of hash as, search engine system is differed only in containing The url of hashbang is friendly.
In the embodiment of the present application, after a former webpage is split into multiple views, it is possible to according to hash or The rule of hashbang, add in after the first network address used when former webpage accesses in PC browsers hash or Hashbang is identified, and it is different to distinguish then to generate a mark respectively for each view according still further to certain mapping ruler View, and be added to after hash or hashbang marks, collectively constitute the second network address of view.For example, as shown in figure 4, Assuming that there are one webpage A, left part represents the first network address used when this webpage accesses in PC browsers, for/ Page1, it now is possible to this webpage be split into 9 views, each view is represented with partial-n.Then according to When hashbang rules generate the second network address of each view, the corresponding network address of view partial-n can be:/page1#!n. Specific number after being identified about hashbang can generate or can also be by according to the rule of hashbang itself Developer specifies.Browser of mobile terminal is shown less since the flat screen size of equipment is small in the page Partial, the page comprising a partial is referred to as a view at this time.
As it can be seen that under this realization method, the second network address of each view only increases compared with the first network address of former webpage " # is added!N " sees that URL scheme can be regarded as not changing on the whole, because of the main part of network address, including agreement, Host, path etc. are all identical, and specific web data remains on the corresponding portion of the former webpage of reservation, this is also played Save the effect of cost.
Certainly, it for adding the second network address of view of hash or hashbang marks, is sent when to server It,, all can be clear in any character that first # occurs below according to the agreement of browser itself when browsing the request of certain view Device of looking at is read as location identifier.It means that these characters will not all be sent to server end.For example, the original of following URL Meaning is to specify a color value:
http://www.example.com/?color=#fff
But the request that browser is actually sent out is:
GET/?color=HTTP/1.1
Host:www.example.com
It can be seen that " #fff " is omitted.
Therefore, in the embodiment of the present application, initiated in user to certain view/page1#!During the access of n, it is actually transmitted Network address to server end is /page1, and therefore, server end can only all return to each view included in former webpage To client.Meanwhile corresponding JS codes can be added in webpage, this part JS codes can to hash in view network address or Content after person hashbang marks is parsed, and one to match is then selected from each view and is shown to use Family.
Certainly, in this case, it is each under the original webpage due to just having been got when accessing certain view for the first time Therefore the data of a view, can be cached, in this way, when user is switched to certain target view under the original webpage locally When, it is possible to directly parse the content after hash or hashbang marks, and from local data cached middle taking-up mesh The data of view are marked, and are shown.For example, shown in Fig. 5, there can be access control in mobile terminal, each view, Left and right arrow in Fig. 5 is exactly this access control, and the switching of view can be carried out by this arrow.It is for example, it is assumed that current The view shown in the page is partial2, if clicking " left arrow " access control, switches to partial-1, address field Become/page1#!1, if clicking " right arrow " access control, partial-3 is switched to, address field becomes/page1#!3.
It is above-mentioned it is this generation network address mode it is more convenient, and can utilize hash or hashbang after it is specific in The variation of appearance will not lead to the natural advantage that the page integrally refreshes, and each view is positioned.But it is the disadvantage is that, need Content after hash or hashbang is parsed by the JS codes in the page, therefore, if browser does not support JS or JS Disabled, then this method can fail.
It therefore,, can also be directly after former the first network address of webpage plus use referring to Fig. 6 under another realization method In the mark for distinguishing each view, certainly, specific mark can be automatically generated according to preset mapping ruler.For example, Left side in Fig. 6 represents the situation that a webpage is shown on PC browsers, and network address is /page1, is split as 9 views (Certainly differ the difference surely embodied between different views in PC browsers), each view represents with partial-n. Then according to certain mapping ruler, the network address of each view can be in Fig. 6 shown in right side /page1-partial-n.It is mobile whole Browser is held since the flat screen size of equipment is small, less partial is shown in the page, it is similary to claim comprising one The page of partial is a view.There is access control in each page(Left and right arrow), click can load others and regard Figure;Assuming that partial-2 is shown in current page, if clicking " left arrow ", partial-1 is switched to, address field becomes For/page1-partial-1, if clicking " right arrow ", partial-3 is switched to, address field becomes/page1-partial- 3。
As it can be seen that it is no longer identified in the network address of view comprising hash or hashbang, that is, the second network address of each view In contrast it is more independent.Certainly, the first network address of former webpage is still included in the network address of each view, between the two still It is closely related.Also, a web data is preserved again without each view is individually for, still using former webpage first The corresponding a web data of network address.
Under this realization method, when the link that user clicks certain view is initiated to access, it is possible to directly by the view Complete network address be sent to server end.Certain server end preserves former the first network address of webpage and between the second network address figure Therefore mapping relations, when returning to web data, can select various ways.For example, under one way in which, server end Can the first network address be extracted, to determine the webpage belonging to given view, so from the second network address according to web address mapping rule The corresponding viewdata of the second network address in access request is directly extracted from the web data of the affiliated webpage webpage of view afterwards, And it returns.The data that client is directly returned according to server end in this way are loaded.Alternatively, under another way, Server end extracts the first network address according to mapping relations after the request for accessing given view is received from the second network address, with Just it determines the target webpage belonging to given view namely finds that the view is a segment of certain webpage.At this point it is possible to directly will The total data and mapping ruler of the affiliated webpage of the view all return to client, that is to say, that by the data one of each view And return to client.Client after receipt, can therefrom extract user and specify access according to web address mapping rule The corresponding data of view, are then shown, you can the view that user specifies is shown in the page.As it can be seen that in former reality Under existing mode, if user needs to be switched to other views and be browsed, switching every time is required for obtaining to server end again Take the data of respective view.And under latter realization method, due to accessing first view(It is 1 to be not necessarily number View, for example, user can also since number be 5 view browsing etc.)When, server by the data of each view all Client is returned to, therefore, client can be cached, and when subsequently carrying out view switching, extracted and regarded directly from caching Diagram data, the process that can cause switching in this way are more smooth.When user exits the access to view each in the webpage, The web data in caching can then be emptied, when next time visits again the view in the webpage, then initiate to ask to server again It asks.Certainly, if the corresponding amount of views of a former webpage is very big, and user only need to browse one of those or it is several A view, then It is not necessary to which the data of view each in webpage are returned to client together, therefore the first side may be used Formula is realized, causes to waste to avoid to flow.
For this network address generating mode that view identification is added directly after the network address of former webpage, versatility is stronger, Even if browser does not support JS or disables JS, the positioning to single view also can be still realized.
In addition, since each view has respective second network address, user during each view is browsed, One of view can be collected, save as bookmark, in this way, browser can record the view being saved The second network address.Subsequently when user again wants to browse the view, it is possible to it initiates to ask by way of checking bookmark, At this point, the response process of server and the processing procedure of client, pass through the side such as clickthrough or input network address with user Formula initiation can be identical to the access process of certain view.Also, according to the difference of view network address generating mode, server end With the processing mode of client can with different, for example, if being realized by way of hash or hashbang, Then when user checks label, the network address of former webpage can only be sent to server, therefore, server can be by each view Data all return to client, and the JS codes of client are further according to the view identification included in the network address of label, from server The data that the extracting data that end returns goes out target view are shown.And if using directly adding after the network address of former webpage Add the network address generating mode of view identification, then can the corresponding view network address of label be directly sent directly to server, service Device can select to be returned only to the data of the view or all data of each view.Certainly, it is contemplated that user checks label When, it generally may be only interested in the corresponding view of the label, check that the possibility of other views in same webpage is little, therefore, Server can be returned only to the data of the view, avoid causing the waste of flow.
Above-described embodiment three is described method of the another kind in mobile terminal loading webpage from the angle of client, Correspondingly, the specific implementation for server end, then it can be there are many different realization methods, below by example IV to reality Example six is applied to be introduced in detail.
Example IV
Referring to Fig. 7, if the second network address of each view is made when the target webpage accesses in immobile terminal After hash or hashbang marks are added on the basis of first network address, then add for distinguishing the mark of each view and give birth to Into, then the method for providing web data to mobile terminal of server end may comprise steps of:
S701:Receive the web access requests that client is sent;Wherein, if the browse request that client receives is clear Look at the request of certain view, then what is carried in the web access requests that client is sent is first network address;
S702:It is if the web access requests are sent out by mobile terminal, first network address is corresponding Whole web datas and the mapping ruler return to client, so that the client is according to the view of requested browsing Second network address and the mapping ruler extract second network address from the corresponding whole web datas of first network address Corresponding web data, and loaded in current page.
Embodiment five
Referring to Fig. 8, if the network address of each view is to add to distinguish respectively on the basis of the network address of the target webpage The mark of view and generate, then server end to mobile terminal provide web data method may comprise steps of:
S801:Receive the web access requests that client is sent;Wherein, if the browse request that client receives is clear Look at the request of given view, then what is carried in the web access requests that client is sent is corresponding second net of the given view Location;
S802:The first network address is extracted from second network address, to determine the target network belonging to the given view Page;
S803:According to the mapping ruler, described specify is extracted from the corresponding web data of first network address and is regarded The corresponding viewdata of the second network address of figure simultaneously returns, so that client is regarded according to the second network address of the given view is corresponding Diagram data loads the given view.
Embodiment six
If the network address of each view is the mark added on the basis of the network address of the target webpage for distinguishing each view Know and generate, then can also use the realization method different from embodiment five, specifically, referring to Fig. 9, server end to shifting The method that dynamic terminal provides web data may comprise steps of:
S901:Receive the web access requests that client is sent;Wherein, if the browse request that client receives is clear Look at the request of given view, then what is carried in the web access requests that client is sent is corresponding second net of the given view Location;
S902:The first network address is extracted from second network address, to determine the target network belonging to the given view Page;
S903:The corresponding whole web datas of first network address and the mapping ruler are returned into client, with Toilet states second network address and the mapping ruler of the client according to the view of requested browsing, is corresponded to from first network address Whole web datas in extract the corresponding web data of second network address, and loaded in current page.
Specific implementation and respective advantageous effect about example IV to embodiment six, in embodiment three into It has gone and has introduced in detail, in view of length limits, which is not described herein again.
Corresponding with the method in mobile terminal loading webpage that the embodiment of the present application one provides, the embodiment of the present application also carries A kind of device in mobile terminal loading webpage is supplied, in the apparatus, during by mobile terminal accessing webpage, and by non- Using identical network address during the mobile terminal accessing webpage, and the network address corresponds to same set of web data in server end;Ginseng See Figure 10, which can include:
Unit 1001 is rewritten in address, and the is accessed by navigation entry in the first webpage in the terminal for receiving After the request of two webpages, the address of browser address bar is rewritten as to the network address of second webpage, to trigger browser Address modification event;
Request unit 1002, in described address change event, based on the network address of second webpage, to corresponding Server sends access request, so that the server is according to the access request and the web data, generation described the The two webpages data required when mobile terminal is shown and return;Wherein, second webpage is required when mobile terminal is shown Data be the part in the second webpage whole web data;
Loading unit 1003, the data for being returned according to the server load second webpage.
Wherein, address rewrite unit 1001 it is specific can be used for receiving access the by the navigation entry in the first webpage After the request of two webpages, by systematic difference Program Interfaces API, the address of browser address bar is rewritten as described The network address of two webpages.
In addition, the method for web data is provided relative to the application to mobile terminal with what the embodiment of the present application two provided Embodiment additionally provides a kind of device that web data is provided to mobile terminal, and logical during by mobile terminal accessing webpage It crosses when immobile terminal accesses the webpage using identical network address, and the network address corresponds to same set of webpage number in server end According to referring to Figure 11, described device includes:
The reception of first access request is single, and 1101, for receiving the web access requests of client transmission;
First data generating unit 1102, if being access request, and be to pass through shifting for the web access requests The request that dynamic terminal is sent out, then according to the corresponding web data of the network address carried in the web access requests, generation webpage exists Mobile terminal data required when showing, wherein, the webpage data required when mobile terminal is shown are complete for the webpage A part in portion's web data;
First returning unit 1103, for returning to the webpage data required when mobile terminal is shown, so as to client End loads the webpage in terminal device.
In addition, corresponding with the method in mobile terminal loading webpage that the embodiment of the present application three provides, the application is implemented Example additionally provides a kind of device in mobile terminal displayed web page, in the apparatus, is in advance split as the content of target webpage The target webpage corresponding multiple views when showing on mobile terminals, and while being accessed in immobile terminal with webpage use It is the respective network address of each view generation, the target webpage and each view according to preset mapping ruler based on network address Same set of web data is corresponded in server end;Referring to Figure 12, which can include:
Access request transmitting element 1201, after the request that given view is browsed for receiving user, according to described specified The network address of view sends access request to server;
View display unit 1202 for the data returned according to server, described specify is loaded in current page and is regarded Figure, and in current page, provide the access control of other views;
View switch unit 1203 browses a upper view or next view for working as to receive by the access control Request when, in current page loading on a view or next view.
Wherein, if the active view browsed is saved as bookmark by user, and browser saves active view Network address, then access request transmitting element 1201 receives user browses the request of given view, including:When the book being saved For label when being checked, what is received browses the request of the corresponding given view of the bookmark, where during to jump directly to preserve View.
During specific implementation, the second network address of each view is used when the target webpage accesses in immobile terminal The first network address on the basis of after addition hash or hashbang marks, then add for distinguishing the mark of each view and generate , the access request transmitting element 1201 is specifically used for:
After receiving the request that user browses given view, by network address of the target webpage in immobile terminal platform Server is sent to, so that server returns to the data of each view of the target webpage and the mapping ruler;
The view display unit 1202 can specifically include:
Subelement is extracted, for extracting the view after hash or hashbang marks from the network address of the given view Mark;
It shows subelement, for the view identification extracted according to and the mapping ruler, is returned from server The corresponding view of the extracting data view identification data, and load in current page that the view identification is corresponding to be regarded Figure.
In addition, in order to enable the process of view switching is more smooth, which can also include:
Buffer unit, for server to be returned to the data of each view of the target webpage and the mapping ruler It is cached locally;
The view switch unit 1203 is specifically used for:
When receiving the request for browsing a upper view or next view from access control, according to the local cache The data of each view and the mapping ruler load a view or next view in current page.
Under another realization method, the network address of each view can add to use on the basis of the network address of the target webpage It is generated in the mark for distinguishing each view.
At this point, access request transmitting element 1201 specifically can be used for:
After receiving the request that user browses given view, the second network address of the given view is submitted to server, So that server goes out according to the extracting data of the mapping ruler from the target webpage the second network address of the given view Corresponding viewdata simultaneously returns;
The view display unit 1202 specifically can be used for:
According to server return the given view the corresponding viewdata of network address, in current page loading described in Given view.
At this point, view switch unit 1203 is specifically used for:
When receiving the request for browsing a upper view or next view from access control, according to a upper view or Second network address of the lower view of person is initiated to ask to server again, so as to server according to the mapping ruler from the target The extracting data of webpage goes out the corresponding viewdata of the second network address of a upper view or next view and returns;
The upper view or the corresponding viewdata of network address of next view returned according to server, in current page A upper view or next view are loaded in face.
Alternatively, access request transmitting element 1201 specifically can be used for:
After receiving the request that user browses given view, the second network address of the given view is submitted to server, So that server determines corresponding target webpage, and will be wrapped in the mapping ruler and target webpage according to the mapping ruler The data of each view contained all return;
The view display unit 1202 is specifically used for:
According to the view identification and the mapping ruler included in the second network address of the given view, returned from server The corresponding viewdata of the second network address of the given view is selected in each view of the target webpage returned, and is being worked as The given view is loaded in the preceding page.
In addition, in order to enable the process of view switching is more smooth, which can also include:
Buffer unit, for server to be returned to the data of each view of the target webpage and the mapping ruler It is cached locally;
The view switch unit 1203 is specifically used for:
When the request that the display upper view of access or next view are received from access control, delayed according to the local The data for each view deposited and the mapping ruler load a view or next view in current page.
It is corresponding with the method that web data is provided to mobile terminal that the embodiment of the present application four provides, the embodiment of the present application A kind of device that web data is provided to mobile terminal is additionally provided, is in advance split as the content of target webpage in server end The target webpage corresponding multiple views when showing on mobile terminals, and while being accessed in immobile terminal with webpage use Be respective second network address of each view generation according to preset mapping ruler based on first network address, first network address with Each second network address corresponds to same set of web data in server end;Wherein, the second network address of each view is described After hash or hashbang marks are added on the basis of the first network address that target webpage uses when being accessed in immobile terminal, then It is generated in addition for distinguishing the mark of each view, referring to Figure 13, described device can include:
Second access request receiving unit 1301, for receiving the web access requests of client transmission;Wherein, it is if objective The browse request that family termination receives is to browse the request of certain view, then what is carried in the web access requests that client is sent is institute State the first network address;
Second returning unit 1302, if sent out for the web access requests by mobile terminal, by institute It states the corresponding whole web datas of the first network address and the mapping ruler returns to client, so that the client is according to quilt The second network address of the view of browsing and the mapping ruler are asked, is carried from the corresponding whole web datas of first network address The corresponding web data of second network address is taken out, and is loaded in current page.
It is corresponding with the method that web data is provided to mobile terminal that the embodiment of the present application five provides, the embodiment of the present application A kind of device that web data is provided to mobile terminal is additionally provided, is in advance split as the content of target webpage in server end The target webpage corresponding multiple views when showing on mobile terminals, and while being accessed in immobile terminal with webpage use Be respective second network address of each view generation according to preset mapping ruler based on first network address, first network address with Each second network address corresponds to same set of web data in server end;Wherein, the network address of each view is in the target webpage Network address on the basis of add and generated for distinguishing the mark of each view, referring to Figure 14, described device can include:
Third access request receiving unit 1401, for receiving the web access requests of client transmission;Wherein, it is if objective The browse request that family termination receives is to browse the request of given view, then what is carried in the web access requests that client is sent is Corresponding second network address of the given view;
Network address extraction unit 1402, it is described specified to determine for extracting the first network address from second network address Target webpage belonging to view;
Third returning unit 1403, for according to the mapping ruler, from the corresponding web data of first network address It extracts the corresponding viewdata of the second network address of the given view and returns, so that client is according to the given view The corresponding viewdata of second network address loads the given view.
It is corresponding with the method that web data is provided to mobile terminal that the embodiment of the present application six provides, the embodiment of the present application A kind of device that web data is provided to mobile terminal is additionally provided, is in advance split as the content of target webpage in server end The target webpage corresponding multiple views when showing on mobile terminals, and while being accessed in immobile terminal with webpage use Be respective second network address of each view generation according to preset mapping ruler based on first network address, first network address with Each second network address corresponds to same set of web data in server end;Wherein, the network address of each view is in the target webpage Network address on the basis of add and generated for distinguishing the mark of each view, referring to Figure 15, described device includes:
The reception of 4th access request is single, and 1501, for receiving the web access requests of client transmission;Wherein, it is if objective The browse request that family termination receives is to browse the request of given view, then what is carried in the web access requests that client is sent is Corresponding second network address of the given view;
Network address extraction unit 1502, it is described specified to determine for extracting the first network address from second network address Target webpage belonging to view;
4th returning unit 1503, for by the corresponding whole web datas of first network address and the mapping ruler Client is returned to, so as to second network address of the client according to the view of requested browsing and the mapping ruler, from The corresponding web data of second network address is extracted, and in current page in the corresponding whole web datas of first network address In loaded.
As seen through the above description of the embodiments, those skilled in the art can be understood that the application can It is realized by the mode of software plus required general hardware platform.Based on such understanding, the technical solution essence of the application On the part that the prior art contributes can be embodied in the form of software product in other words, the computer software product It can be stored in storage medium, such as ROM/RAM, magnetic disc, CD, be used including some instructions so that a computer equipment (Can be personal computer, server or the network equipment etc.)Perform the certain of each embodiment of the application or embodiment Method described in part.
Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment Point just to refer each other, and the highlights of each of the examples are difference from other examples.Especially for system or For system embodiment, since it is substantially similar to embodiment of the method, so describing fairly simple, related part is referring to method The part explanation of embodiment.System and system embodiment described above is only schematical, wherein the conduct The unit that separating component illustrates may or may not be it is physically separate, the component shown as unit can be or Person may not be physical unit, you can be located at a place or can also be distributed in multiple network element.It can root Factually border needs to select some or all of module therein realize the purpose of this embodiment scheme.Ordinary skill Personnel are without creative efforts, you can to understand and implement.
Above to the method and device provided herein for loading webpage in mobile terminal, providing web data, carry out It is discussed in detail, the principle and implementation of this application are described for specific case used herein, above example Explanation be merely used to help understand the present processes and its core concept;Meanwhile for those of ordinary skill in the art, According to the thought of the application, there will be changes in specific embodiments and applications.In conclusion in this specification Hold the limitation that should not be construed as to the application.

Claims (21)

  1. A kind of 1. method in mobile terminal loading webpage, which is characterized in that during by mobile terminal accessing webpage, with passing through Using identical network address when immobile terminal accesses the webpage, and the network address corresponds to same set of web data in server end, The method includes:
    After mobile terminal receives the request that the second webpage is accessed by the navigation entry in the first webpage, by browser address bar Address be rewritten as the network address of second webpage, to trigger the address modification event of browser;Wherein, first webpage Belong to the webpage under same site with the second webpage;
    In described address change event, based on the network address of second webpage, access request is sent to corresponding server, with Toilet states server according to the access request and the web data, generates second webpage when mobile terminal is shown Required data and return;Wherein, second webpage data required when mobile terminal is shown are complete for second webpage A part in portion's web data;
    Local hydrodynamic unit is carried out on the basis of first webpage, and show second net according to the data that the server returns Page.
  2. 2. according to the method described in claim 1, it is characterized in that, the mobile terminal is received through leading in the first webpage After the entrance that navigates accesses the request of the second webpage, the address of browser address bar is rewritten as to the network address of second webpage, including:
    After receiving the request that the second webpage is accessed by the navigation entry in the first webpage, pass through systematic difference programming The address of browser address bar is rewritten as the network address of second webpage by interface API.
  3. A kind of 3. method that web data is provided to mobile terminal, which is characterized in that during by mobile terminal accessing webpage, with Using identical network address when accessing the webpage by immobile terminal, and the network address corresponds to same set of webpage number in server end According to, the method includes:
    The web access requests that client is sent are received, wherein, the web access requests are triggered by the client Browser address bar address modification event and send out, in described address change event, the address of the browser address bar The address of the second webpage is rewritten as by the address of the first webpage, first webpage and the second webpage belong to the net under same site Page;
    When the web access requests are the request sent out by mobile terminal, according to what is carried in the web access requests The corresponding web data of network address of second webpage, the second webpage of generation data required when mobile terminal is shown, wherein, it is described The second webpage data required when mobile terminal is shown are the part in the second webpage whole web data;
    The webpage data required when mobile terminal is shown are returned to, so that client carries out on the basis of first webpage Local hydrodynamic unit, and show second webpage.
  4. A kind of 4. method in mobile terminal loading webpage, which is characterized in that in advance in server end by the content of target webpage When being split as corresponding multiple views when the target webpage is shown on mobile terminals, and being accessed in immobile terminal with webpage It is respective second network address of each view generation according to preset mapping ruler based on the first network address used, described first Network address and each second network address are in the corresponding same set of web data of server end;In client, the method includes:
    After the request for receiving browsing given view, access request is sent to server according to the network address of the given view;
    According to the data that server returns, the given view is loaded in current page, and in current page, other are provided The access control of view;
    When receiving the request for browsing a upper view or next view by the access control, loaded in current page A upper view or next view.
  5. 5. according to the method described in claim 4, it is characterized in that, if active view is saved as bookmark, and browser The second network address of active view is saved, then the request for receiving browsing given view, including:When the bookmark quilt being saved When checking, what is received browses the request of the corresponding given view of the bookmark, the view where during to jump directly to preserve.
  6. 6. method according to claim 4 or 5, which is characterized in that the second network address of each view is in the target network On the basis of the first network address that page uses when being accessed in immobile terminal after addition hash or hashbang marks, then add It is generated for distinguishing the mark of each view, after the request for receiving user and browsing given view, according to described specified The network address of view sends access request to server, including:
    After the request for receiving browsing given view, network address of the target webpage in immobile terminal platform is sent to clothes Business device, so that server returns to the data of each view of the target webpage and the mapping ruler;
    The data returned according to server, load the given view in current page, including:
    The view identification after hash or hashbang marks is extracted from the network address of the given view;
    According to the view identification extracted and the mapping ruler, from the extracting data of the server return view mark Know the data of corresponding view, and the corresponding view of the view identification is loaded in current page.
  7. 7. it according to the method described in claim 6, it is characterized in that, further includes:
    The data and the mapping ruler that server is returned to each view of the target webpage are cached locally;
    It is described when receiving the request for browsing a upper view or next view from access control, loaded in current page One view or next view, including:
    When receiving the request for browsing a upper view or next view from access control, according to each of the local cache The data of view and the mapping ruler load a view or next view in current page.
  8. 8. method according to claim 4 or 5, which is characterized in that the network address of each view is in the target webpage Addition generates for distinguishing the mark of each view on the basis of network address.
  9. 9. according to the method described in claim 8, it is characterized in that, it is described receive browsing given view request after, according to Second network address of the given view sends access request to server, including:
    After the request for receiving browsing given view, the second network address of the given view is submitted to server, to service The second network address that device goes out the given view according to the extracting data of the mapping ruler from the target webpage corresponding regards Diagram data simultaneously returns;
    The data returned according to server, load the given view in current page, including:
    According to the corresponding viewdata of network address for the given view that server returns, loaded in current page described specified View.
  10. 10. according to the method described in claim 9, it is characterized in that, described ought receive the upper view of browsing from access control A view or next view on either being loaded in current page during the request of next view, including:
    When from access control receive browse a upper view either request of next view when according to a upper view or under Second network address of one view is initiated to ask to server again, so as to server according to the mapping ruler from the target webpage Extracting data go out the corresponding viewdata of the second network address of a upper view or next view and return;
    The upper view or the corresponding viewdata of network address of next view returned according to server, in current page Load a upper view or next view.
  11. 11. according to the method described in claim 8, it is characterized in that, it is described receive user browse given view request after, Access request is sent to server according to the second network address of the given view, including:
    After receiving the request that user browses given view, the second network address of the given view is submitted to server, so as to Server determines corresponding target webpage according to the mapping ruler, and will be included in the mapping ruler and target webpage The data of each view all return;
    The data returned according to server, load the given view in current page, including:
    According to the view identification and the mapping ruler included in the second network address of the given view, returned from server The corresponding viewdata of the second network address of the given view is selected in each view of the target webpage, and in current page The given view is loaded in face.
  12. 12. according to the method for claim 11, which is characterized in that further include:
    The data and the mapping ruler that server is returned to each view of the target webpage are cached locally;
    It is described when receiving the request for browsing a upper view or next view from access control, loaded in current page One view or next view, including:
    When the request that the display upper view of access or next view are received from access control, according to the local cache The data of each view and the mapping ruler load a view or next view in current page.
  13. A kind of 13. method that web data is provided to mobile terminal, which is characterized in that in advance in server end by target webpage Content is split as corresponding multiple views when the target webpage is shown on mobile terminals, and is visited in immobile terminal with webpage It is respective second network address of each view generation according to preset mapping ruler based on the first network address used when asking, it is described First network address and each second network address are in the corresponding same set of web data of server end;Wherein, the second net of each view Location be on the basis of the first network address used when the target webpage accesses in immobile terminal addition hash or After hashbang marks, then add for distinguishing the mark of each view and generate, the method includes:
    Receive the web access requests that client is sent;Wherein, if the browse request that client receives is to browse certain view Request, then carry is first network address in the web access requests that client is sent;
    If the web access requests are sent out by mobile terminal, by the corresponding whole webpage numbers of first network address According to this and the mapping ruler returns to client, so as to the client according to the second network address of the view of requested browsing with And the mapping ruler, extract the corresponding webpage of second network address from the corresponding whole web datas of first network address Data, and loaded in current page.
  14. A kind of 14. method that web data is provided to mobile terminal, which is characterized in that in advance in server end by target webpage Content is split as corresponding multiple views when the target webpage is shown on mobile terminals, and is visited in immobile terminal with webpage It is respective second network address of each view generation according to preset mapping ruler based on the first network address used when asking, it is described First network address and each second network address are in the corresponding same set of web data of server end;Wherein, the network address of each view is in institute It states to add on the basis of the network address of target webpage and be generated for distinguishing the mark of each view, the method includes:
    Receive the web access requests that client is sent;Wherein, it is regarded if the browse request that client receives is that browsing is specified The request of figure, then what is carried in the web access requests of client transmission is corresponding second network address of the given view;
    The first network address is extracted from second network address, to determine the target webpage belonging to the given view;
    According to the mapping ruler, the second net of the given view is extracted from the corresponding web data of first network address The corresponding viewdata in location simultaneously returns, so that client is loaded according to the corresponding viewdata of the second network address of the given view The given view.
  15. A kind of 15. method that web data is provided to mobile terminal, which is characterized in that in advance in server end by target webpage Content is split as corresponding multiple views when the target webpage is shown on mobile terminals, and is visited in immobile terminal with webpage It is respective second network address of each view generation according to preset mapping ruler based on the first network address used when asking, it is described First network address and each second network address are in the corresponding same set of web data of server end;Wherein, the network address of each view is in institute It states to add on the basis of the network address of target webpage and be generated for distinguishing the mark of each view, the method includes:
    Receive the web access requests that client is sent;Wherein, it is regarded if the browse request that client receives is that browsing is specified The request of figure, then what is carried in the web access requests of client transmission is corresponding second network address of the given view;
    The first network address is extracted from second network address, to determine the target webpage belonging to the given view;
    The corresponding whole web datas of first network address and the mapping ruler are returned into client, so as to the client Second network address and the mapping ruler of the end according to the view of requested browsing, from the corresponding whole webpages of first network address Extracting data goes out the corresponding web data of second network address, and is loaded in current page.
  16. 16. a kind of device in mobile terminal loading webpage, which is characterized in that during by mobile terminal accessing webpage, with leading to It crosses when immobile terminal accesses the webpage using identical network address, and the network address corresponds to same set of webpage number in server end According to described device includes:
    Unit is rewritten in address, and the second webpage is accessed by the navigation entry in the first webpage in the terminal for receiving After request, the address of browser address bar is rewritten as to the network address of second webpage, to trigger the address modification of browser Event;Wherein, first webpage and the second webpage belong to the webpage under same site;
    Request unit, in described address change event, based on the network address of second webpage, being sent out to corresponding server Access request is sent, so that the server is according to the access request and the web data, second webpage is generated and exists Mobile terminal data required when showing and return;Wherein, second webpage data required when mobile terminal is shown are A part in the second webpage whole web data;
    Loading unit, for carrying out Local hydrodynamic unit on the basis of first webpage according to the data that the server returns, and Show second webpage.
  17. 17. a kind of device that web data is provided to mobile terminal, which is characterized in that during by mobile terminal accessing webpage, Using identical network address during with accessing the webpage by immobile terminal, and the network address corresponds to same set of webpage in server end Data, described device include:
    First access request receiving unit, for receiving the web access requests of client transmission;Wherein, the web page access please The browser address bar address modification event that Seeking Truth is triggered by the client changes event and what is sent out in described address In, the address of the browser address bar is rewritten as the address of the second webpage by the address of the first webpage, first webpage with Second webpage belongs to the webpage under same site;
    First data generating unit, if be access request, and being sent out by mobile terminal for the web access requests The request gone out, then according to the corresponding web data of the network address of the second webpage carried in the web access requests, generation second The webpage data required when mobile terminal is shown, wherein, second webpage data required when mobile terminal is shown are A part in the second webpage whole web data;
    First returning unit, for returning to the webpage data required when mobile terminal is shown, so that client is described Local hydrodynamic unit is carried out on the basis of first webpage, and shows second webpage.
  18. 18. a kind of device in mobile terminal loading webpage, which is characterized in that in advance in server end by the content of target webpage When being split as corresponding multiple views when the target webpage is shown on mobile terminals, and being accessed in immobile terminal with webpage It is respective second network address of each view generation according to preset mapping ruler based on the first network address used, described first Network address and each second network address are in the corresponding same set of web data of server end;In client, described device includes:
    Access request transmitting element, after the request that given view is browsed for receiving user, according to the net of the given view Location sends access request to server;
    View display unit for the data returned according to server, loads the given view, and working as in current page In the preceding page, the access control of other views is provided;
    View switch unit, for when the request that the upper view of browsing or next view are received by the access control When, a view or next view are loaded in current page.
  19. 19. a kind of device that web data is provided to mobile terminal, which is characterized in that in advance in server end by target webpage Content is split as corresponding multiple views when the target webpage is shown on mobile terminals, and is visited in immobile terminal with webpage It is respective second network address of each view generation according to preset mapping ruler based on the first network address used when asking, it is described First network address and each second network address are in the corresponding same set of web data of server end;Wherein, the second net of each view Location be on the basis of the first network address used when the target webpage accesses in immobile terminal addition hash or It after hashbang marks, then adds for distinguishing the mark of each view and generates, described device includes:
    Second access request receiving unit, for receiving the web access requests of client transmission;Wherein, if client receives To browse request be to browse the request of certain view, then carry is first net in the web access requests that client is sent Location;
    Second returning unit, if sent out for the web access requests by mobile terminal, by first net The corresponding whole web datas in location and the mapping ruler return to client, so that the client is according to requested browsing View the second network address and the mapping ruler, extracted from the corresponding whole web datas of first network address described The corresponding web data of second network address, and loaded in current page.
  20. 20. a kind of device that web data is provided to mobile terminal, which is characterized in that in advance in server end by target webpage Content is split as corresponding multiple views when the target webpage is shown on mobile terminals, and is visited in immobile terminal with webpage It is respective second network address of each view generation according to preset mapping ruler based on the first network address used when asking, it is described First network address and each second network address are in the corresponding same set of web data of server end;Wherein, the network address of each view is in institute It states to add on the basis of the network address of target webpage and be generated for distinguishing the mark of each view, described device includes:
    Third access request receiving unit, for receiving the web access requests of client transmission;Wherein, if client receives To browse request be to browse the request of given view, then what is carried in the web access requests that client is sent is described specified Corresponding second network address of view;
    Network address extraction unit, for extracting the first network address from second network address, to determine belonging to the given view Target webpage;
    Third returning unit, for according to the mapping ruler, institute to be extracted from the corresponding web data of first network address It states the corresponding viewdata of the second network address of given view and returns, so that client is according to the second network address of the given view Corresponding viewdata loads the given view.
  21. 21. a kind of device that web data is provided to mobile terminal, which is characterized in that in advance in server end by target webpage Content is split as corresponding multiple views when the target webpage is shown on mobile terminals, and is visited in immobile terminal with webpage It is respective second network address of each view generation according to preset mapping ruler based on the first network address used when asking, it is described First network address and each second network address are in the corresponding same set of web data of server end;Wherein, the network address of each view is in institute It states to add on the basis of the network address of target webpage and be generated for distinguishing the mark of each view, described device includes:
    4th access request receiving unit, for receiving the web access requests of client transmission;Wherein, if client receives To browse request be to browse the request of given view, then what is carried in the web access requests that client is sent is described specified Corresponding second network address of view;
    Network address extraction unit, for extracting the first network address from second network address, to determine belonging to the given view Target webpage;
    4th returning unit, for the corresponding whole web datas of first network address and the mapping ruler to be returned to visitor Family end, so as to second network address of the client according to the view of requested browsing and the mapping ruler, from described first The corresponding web data of second network address is extracted, and added in current page in the corresponding whole web datas of network address It carries.
CN201310394054.6A 2013-08-26 2013-08-26 Webpage, the method and device that web data is provided are loaded in mobile terminal Active CN104423991B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201310394054.6A CN104423991B (en) 2013-08-26 2013-08-26 Webpage, the method and device that web data is provided are loaded in mobile terminal
HK15105121.4A HK1204689A1 (en) 2013-08-26 2015-05-29 Method for loading webpage and providing webpage data and device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310394054.6A CN104423991B (en) 2013-08-26 2013-08-26 Webpage, the method and device that web data is provided are loaded in mobile terminal

Publications (2)

Publication Number Publication Date
CN104423991A CN104423991A (en) 2015-03-18
CN104423991B true CN104423991B (en) 2018-06-15

Family

ID=52973072

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310394054.6A Active CN104423991B (en) 2013-08-26 2013-08-26 Webpage, the method and device that web data is provided are loaded in mobile terminal

Country Status (2)

Country Link
CN (1) CN104423991B (en)
HK (1) HK1204689A1 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104809219B (en) * 2015-04-30 2018-12-25 北京盛世光明软件股份有限公司 A kind of webpage collection method and system
CN106598972B (en) * 2015-10-14 2020-05-08 阿里巴巴集团控股有限公司 Information display method and device and intelligent terminal
CN107404508B (en) * 2016-05-20 2021-04-27 阿里巴巴集团控股有限公司 Client page access method, client and electronic equipment
CN107526751A (en) * 2016-06-22 2017-12-29 广州市动景计算机科技有限公司 Loading method, client, web page server and the programmable device of webpage
CN106991167B (en) * 2017-03-31 2020-12-01 新华三技术有限公司 Web application migration method and device
CN109450972A (en) * 2018-09-29 2019-03-08 阿里巴巴集团控股有限公司 A kind of processing method of data, device and equipment
CN109933382B (en) * 2019-03-11 2022-08-12 安徽志辉教育科技有限公司 Online ppt file preview tool based on owa service
CN110324410B (en) * 2019-06-18 2022-04-05 中国南方电网有限责任公司 Method, device, computer equipment and storage medium for initiating webpage request
CN112749975B (en) * 2019-10-31 2024-03-22 中国移动通信集团浙江有限公司 Method for automatically processing refund request and automatic processing platform
CN113065311A (en) * 2021-02-26 2021-07-02 成都环宇知了科技有限公司 Scoring method and system for processing Power Point manuscript content based on OpenXml

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719125A (en) * 2009-11-06 2010-06-02 冯强 Hand-held communication terminal and webpage browsing method thereof
CN102314486A (en) * 2011-08-04 2012-01-11 百度在线网络技术(北京)有限公司 Method and equipment for browsing page
CN103136238A (en) * 2011-11-28 2013-06-05 百度在线网络技术(北京)有限公司 Method and server of processing page interactive elements at time of converting web page into wireless application protocol (WAP) page

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719125A (en) * 2009-11-06 2010-06-02 冯强 Hand-held communication terminal and webpage browsing method thereof
CN102314486A (en) * 2011-08-04 2012-01-11 百度在线网络技术(北京)有限公司 Method and equipment for browsing page
CN103136238A (en) * 2011-11-28 2013-06-05 百度在线网络技术(北京)有限公司 Method and server of processing page interactive elements at time of converting web page into wireless application protocol (WAP) page

Also Published As

Publication number Publication date
HK1204689A1 (en) 2015-11-27
CN104423991A (en) 2015-03-18

Similar Documents

Publication Publication Date Title
CN104423991B (en) Webpage, the method and device that web data is provided are loaded in mobile terminal
US10911554B2 (en) Method and system for tracking web link usage
CN103984686B (en) page switching method and device
US8386955B1 (en) User-optimized content for web browsing windows
US9547717B2 (en) Administration of search results
CA2734999C (en) New tab pages and bookmark toolbars in a browser
US9727656B2 (en) Interactive sitemap with user footprints
US20090204900A1 (en) Method And System For Navigation Of Web Sites And Applications
US20140282118A1 (en) Graphical user interface displaying multi-branched browsing history tree for web navigation
KR20010044189A (en) Method and apparatus for processing web documents using multi-browse function
CN103678325B (en) It is a kind of for providing the method and apparatus of browsing pages corresponding with initial page
CN105302461B (en) A kind of method and apparatus for the offer target pages in mobile application
US9465814B2 (en) Annotating search results with images
US9575617B1 (en) Navigation payload injection
JP2003281093A (en) Method and device for browsing link destination information in browser
CN101231655A (en) Method and system for processing search engine results
WO2016011699A1 (en) Method and device for use in configuring navigation page of browser
US20160299985A1 (en) Method for accessing last search
US8413062B1 (en) Method and system for accessing interface design elements via a wireframe mock-up
KR101132220B1 (en) Method, system and computer-readable recording medium for providing web page using cache
US20100174986A1 (en) Apparatus and method for moving to previous website in web browser
WO2009111714A1 (en) System and method for the on screen synchronization of selection in virtual document
US11921986B1 (en) System and method for web page navigation behavior
CN110020337A (en) Web page processing method and Related product
KR20010070783A (en) Method and apparatus for processing web documents using multi-browse function

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1204689

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant