CN104283920A - Use method, server, terminal and system for Webapp router - Google Patents

Use method, server, terminal and system for Webapp router Download PDF

Info

Publication number
CN104283920A
CN104283920A CN201310282453.3A CN201310282453A CN104283920A CN 104283920 A CN104283920 A CN 104283920A CN 201310282453 A CN201310282453 A CN 201310282453A CN 104283920 A CN104283920 A CN 104283920A
Authority
CN
China
Prior art keywords
page
point information
content
pages data
virtual
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201310282453.3A
Other languages
Chinese (zh)
Inventor
漆昱恒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201310282453.3A priority Critical patent/CN104283920A/en
Publication of CN104283920A publication Critical patent/CN104283920A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/986Document structures and storage, e.g. HTML extensions

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a use method for a Webapp router. The method comprises the steps that a virtual page display request is received, and the request contains a URL of a virtual page; whether the URL contains scanning point information is judged, if yes, information of the corresponding virtual page is inquired and sent out according to the page serial number (ID) in the scanning point information or the page ID and page parameters, and if not, information of a preset initial page is inquired and sent out. The invention further provides a server, a terminal and a system for the Webapp router. Accordingly, the problem that the virtual page can not be stored in a current single-page application can be solved, propagation and quote of the virtual page can be achieved, and forward and backward operations in the process of browsing the virtual page are achieved.

Description

A kind of method of network application route, server, terminal and system
Technical field
The present invention relates to the network communications technology, particularly relate to the method for a kind of network application (Webapp) route, server, terminal and system.
Background technology
Webapp technology generally adopts single-page to apply the implementation of (SPA, Single Page App) this terminal page, and it is both as traditional page, and operating experience is similar to again native applications (app).One is only had towards the address of browser on terminal backstage when SPA realizes, the simultaneously link clicked according to user of terminal or the behavior of user, the change of terminal page content is realized by script (JavaScript), during the behavior triggering page content change of user clicks on links or user, the information (comprising content of pages data and page structure) of the change page is spliced by JavaScript, and the JavaScript content of pages data of splicing required for the page and page structure, then by using asynchronous script and extend markup language (AJAX, Asynchronous Java Script and Extensible markup language) Dynamic Acquisition, the page of the information splicing that JavaScript utilizes AJAX to obtain, be referred to as virtual page number.
There is following problem in current single-page application:
1, the page owing to converting in browser shows with the form of virtual page number, described virtual page number is in transitory state, cannot identify browser current display page, if refresh browser current page, browser can show the initialization page at current page, but not the virtual page number before refreshing; That is, the current state of virtual page number is transitory state, cannot preserve;
2, current page cannot be collected in a browser, or current virtual content of pages is carried out propagating or quoting;
3, owing to being with the page of the form display transformation of virtual page number, browser cannot recording user browsing histories, and the function thus the page that user can not be provided often to use when browsing pages moves forward and backward, have impact on Consumer's Experience.
Summary of the invention
In view of this, main purpose of the present invention is to provide a kind of method of Webapp route, server, terminal and system, solve in the application of current single-page and cannot preserve the problem of virtual page number, can realize to the propagation of virtual page number and quote and the browsing virtual page time the operation that moves forward and backward.
For achieving the above object, technical scheme of the present invention is achieved in that
The invention provides a kind of method of Webapp route, described method comprises:
Receive the request of display virtual page number, described request carries the unified resource URLs (URL, Uniform Resource Locator) of virtual page number;
Judge whether described URL carries described point information, if carried, then according to the page sequence number (ID, IDentity) in described described point information or according to page ID and page parameter, inquire about the information of the respective virtual page and send; Otherwise inquiry is preset the information of initial page and is sent.
Preferably, described method also comprises:
Set up the mapping relations of the page ID of virtual page number and the page structure of described virtual page number and content of pages data-interface, or set up the mapping relations of the page ID of virtual page number and the page structure of page parameter and described virtual page number and content of pages data-interface;
Described according to the page ID in described point information or according to page ID and page parameter, the information of the inquiry respective virtual page, comprising:
With the page ID in described described point information for index, in the mapping relations set up, inquire about corresponding page structure and content of pages data-interface, and inquire about corresponding content of pages data by described content of pages data-interface; Or
With the page ID in described described point information and page parameter for index, in the mapping relations of described foundation, inquire about corresponding page structure and content of pages data-interface, and by the content of pages data of described content of pages data-interface inquiry correspondence.
Preferably, described method also comprises:
Whether the described point information that monitoring virtual page number URL carries changes, and when determining that described point information changes, according to the page ID in the described point information after change or according to page ID and page parameter, page structure and the content of pages Data Concurrent of the inquiry respective virtual page send.
Preferably, described method also comprises: monitor described point information that virtual page number URL carries when changing, the sequencing changed according to described described point information stores described described point information;
Described method also comprises: when the request receiving retrogressing page or the front form advance showing the current virtual page, page ID in described retrogressing page or described point information corresponding to front form advance or page ID and page parameter is determined according to the described point information of described storage and the sequencing of change thereof, and according to the page ID in the described point information of correspondence or according to page ID and page parameter, page structure and the content of pages Data Concurrent of inquiring about described retrogressing page or front form advance send.
Preferably, described according to the page ID in the described point information of correspondence or according to page ID and page parameter, before the page structure inquiring about described retrogressing page or front form advance and content of pages data, described method also comprises:
Judge whether the page structure and the content of pages data that retreat page or front form advance described in buffer memory, if buffer memory, then send the described retrogressing page of buffer memory or the page structure of front form advance and content of pages data; Otherwise according to the page ID in the described point information of correspondence or according to page ID and page parameter, page structure and the content of pages Data Concurrent of inquiring about described retrogressing page or front form advance send.
The present invention also provides a kind of Webapp server, comprising: transceiver module and enquiry module,
Described transceiver module, for receiving the request of display virtual page number, described request carries the uniform resource position mark URL of virtual page number;
Described enquiry module, for judging whether described URL carries described point information, if carried, then according to the page ID in described described point information or according to page ID and page parameter, the information of the inquiry respective virtual page, otherwise the information of initial page is preset in inquiry;
Described transceiver module also for, send the information of described enquiry module inquiry gained virtual page number or the information of initial page.
Preferably, described server also comprises:
Mapping block, for the page structure of page ID and described virtual page number of setting up virtual page number and the mapping relations of content of pages data-interface, or set up the mapping relations of the page ID of virtual page number and the page structure of page parameter and described virtual page number and content of pages data-interface;
Described enquiry module, also for the page ID in described described point information for index, in the mapping relations that described mapping block is set up, inquire about corresponding page structure and content of pages data-interface, and inquire about corresponding content of pages data by described content of pages data-interface; Or, with the page ID in described described point information and page parameter for index, in the mapping relations that described mapping block is set up, inquire about corresponding page structure and content of pages data-interface, and inquire about corresponding content of pages data by described content of pages data-interface.
Preferably, described server also comprises:
Monitoring modular, whether the described point information of carrying for monitoring virtual page number URL changes, and the described point information after changing that sends when determining that described point information changes is to described enquiry module;
Described enquiry module, also for the page ID in the described point information that sends according to described monitoring modular or according to page ID and page parameter, inquires about page structure and the content of pages data of described virtual page number;
Described transceiver module, also for sending page structure and the content of pages data of described enquiry module inquiry gained.
Preferably, described monitoring modular, also for when monitoring the described point information change that virtual page number URL carries, the sequencing changed according to described described point information stores described described point information;
Described enquiry module, time also for receiving the request of the retrogressing page of the display current virtual page or front form advance at described transceiver module, the described point information stored according to described monitoring modular and the sequencing of change thereof, determine page ID in described retrogressing page or described point information corresponding to front form advance or page ID and page parameter, according to described page ID or according to page ID and page parameter, inquire about page structure and the content of pages data of described retrogressing page or front form advance;
Described transceiver module, also for sending page structure and the content of pages data of described retrogressing page or front form advance.
Preferably, described server also comprises: cache module, for the information of initial page and/or the information of virtual page number of enquiry module inquiry gained described in buffer memory;
Also for before the page structure of inquiring about described retrogressing page or front form advance at described enquiry module and content of pages data, whether described cache module inquiry self is cached with page structure and the content of pages data of described retrogressing page or front form advance, if buffer memory, then send the described retrogressing page of buffer memory or the page structure of front form advance and content of pages data by described transceiver module; Otherwise, indicate described enquiry module to inquire about page structure and the content of pages data of described retrogressing page or front form advance.
The present invention also provides a kind of Webapp terminal, comprising: sending module and receiver module,
Described sending module, for sending the request of display virtual page number, described request carries the uniform resource position mark URL of virtual page number, and described URL carries described point information, and described described point information comprises page ID or comprises page ID and page parameter;
Described receiver module, for receiving the information of virtual page number.
Preferably, described terminal also comprises: distribution module, for according to the page ID preset and page parameter, for the virtual page number of different content distributes described point information unique separately.
The present invention also provides a kind of Webapp route system, and described system comprises aforesaid Webapp server and aforesaid Webapp terminal.
The method of a kind of Webapp route provided by the present invention, server, terminal and system, described point information is carried at the URL of terminal request virtual page number, so can according to the page ID in described described point information or the virtual page number distinguishing different content according to page ID and page parameter, and, can the information of the respective virtual page be inquired about according to the page ID in described described point information or according to page ID and page parameter and return to described terminal, solve the problem that virtual page number cannot be preserved; Further, based on above-mentioned process, terminal use can propagate the URL of virtual page number and quote; By the described point information of the storing virtual page and the sequencing of change thereof, the front form advance of the current virtual page can be determined or retreat page, thus determine described front form advance according to the described point information of correspondence or retreat page structure and the content of pages data of page, be sent to described terminal and by terminal loads, solve and can not advance to virtual page number or the problem of back operation.
Accompanying drawing explanation
The realization flow figure of the method for a kind of Webapp route that Fig. 1 provides for the embodiment of the present invention;
The composition structural representation of a kind of Webapp route system that Fig. 2 provides for the embodiment of the present invention;
Fig. 3 a for a kind of Webapp route device that the embodiment of the present invention provides be the realization flow schematic diagram of the information of terminal request virtual page number;
Power function schematic diagram in a kind of Webapp route device code that Fig. 3 b embodiment of the present invention provides.
Embodiment
Below in conjunction with the drawings and specific embodiments, the technical solution of the present invention is further elaborated.
The embodiment of the present invention provides a kind of method of Webapp route, as shown in Figure 1, mainly comprises the following steps:
Step 101: receive the request of display virtual page number, described request carries the URL of virtual page number;
The request of described display virtual page number sends to server by terminal usually.Described terminal, according to default page ID and page parameter, for the virtual page number of different content distributes described point information unique separately, and carries the described point information of virtual page number when sending display virtual page number request in the virtual page number URL carried.
Such as, in microblog terminal, the URL that can preset the virtual page number of microblogging different content is as follows:
Homepage: http://ti.3g.qq.com/touch/iphone/index.jsp#myhome;
Message page: http://ti.3g.qq.com/touch/iphone/index.jsp#notification;
Guest's page: http://ti.3g.qq.com/touch/iphone/index.jsp#guest_home/u=T283465 618;
Food Channel page: http://ti.3g.qq.com/touch/iphone/index.jsp#channel/type=cuisines & cid=170;
Wherein, be bebinning character with " # " in described point information, and be that separating character distinguishes page sequence number (ID, IDentity) in described point information and page parameter with "/", when page ID uniquely can not determine virtual page number, uniquely virtual page number can be determined further by page parameter.Such as, guest's page of each microblog terminal user is not identical, therefore, in the described point information " #guest_home/u=T283465618 " that the corresponding URL of above-mentioned guest's page carries, use page parameter mark " T283465618 " for uniquely to determine that ID is guest's page of the microblog terminal user of " T283465618 ".
Step 102 ~ step 104: judge whether described URL carries described point information, if carried, then according to the page ID in described described point information or according to page ID and page parameter, inquires about the information of the respective virtual page and sends; Otherwise inquiry is preset the information of initial page and is sent.
Server is after the display virtual page number request receiving terminal, judge whether the URL that described request is carried carries described point information, if carried, then according to the page ID in described described point information or according to page ID and page parameter, inquire about the information of the respective virtual page and send to terminal; Otherwise inquiry is preset the information of initial page and is sent to terminal.
Described method also comprises:
Set up the mapping relations of the page ID of virtual page number and the page structure of described virtual page number and content of pages data-interface, or set up the mapping relations of the page ID of virtual page number and the page structure of page parameter and described virtual page number and content of pages data-interface;
Described according to the page ID in described described point information or according to page ID and page parameter, the information of the inquiry respective virtual page, comprising:
With the page ID in described described point information for index, in the mapping relations of described foundation, inquire about corresponding page structure and content of pages data-interface, and inquire about corresponding content of pages data by described content of pages data-interface; Or
With the page ID in described described point information and page parameter for index, in the mapping relations of described foundation, inquire about corresponding page structure and content of pages data-interface, and by the content of pages data of described content of pages data-interface inquiry correspondence.
Wherein, when virtual page number uniquely can be determined by page ID, set up the mapping relations of the page ID of virtual page number and the page structure of described virtual page number and content of pages data-interface; When virtual page number needs uniquely to be determined by page ID and page parameter, set up the mapping relations of the content of pages data-interface of the mapping relations of the page ID of virtual page number and the page structure of page parameter and described virtual page number and the page ID of described virtual page number and page parameter and described virtual page number.
Wherein, described page structure and content of pages data are used for for terminal loads virtual page number.
Wherein, step 101 and step 102 are the handling process that terminal virtual page number loads first.
When described terminal use is at current virtual page clickthrough, namely when request shows the virtual page number with current virtual page different content, the virtual page number being different content due to described terminal distributes unique described point separately, and therefore the described point information of described terminal virtual page number URL also can correspondence change.
Described method also comprises: whether the described point information that monitoring virtual page number URL carries changes, and when determining that described point information changes, according to the page ID in the described point information after change or according to page ID and page parameter, page structure and the content of pages Data Concurrent of inquiry virtual page number send.
Wherein, whether the described point information can carried by changing (hashchange) event monitoring terminal virtual page number URL at terminal binding Hash changes, and can trigger hashchange event when terminal virtual page number URL changes; For the terminal not supporting hashchange event, can by periodically obtaining the described point information of current virtual page URL, and judge whether identical with the described point information of the up-to-date virtual page number URL of buffer memory, determine whether the described point information of current virtual page URL changes.
Described method also comprises: when the described point information that described virtual page number URL carries changes, and the sequencing changed according to described described point information stores described described point information;
Accordingly, described method also comprises: when the request receiving retrogressing page or the front form advance showing the current virtual page, page ID in described retrogressing page or described point information corresponding to front form advance or page ID and page parameter is determined according to the described point information of described storage and the sequencing of change thereof, and according to the page ID in the described point information of correspondence or according to page ID and page parameter, page structure and the content of pages Data Concurrent of inquiring about described retrogressing page or front form advance send.
Described according to the page ID in the described point information of correspondence or according to page ID and page parameter, before the page structure inquiring about described retrogressing page or front form advance and content of pages data, described method also comprises:
Judge that whether described terminal retreats page structure and the content of pages data of page or front form advance described in buffer memory, if buffer memory, then send the retrogressing page of buffer memory or the page structure of front form advance and content of pages data; Otherwise according to the page ID in described described point information or according to page ID and page parameter, page structure and the content of pages Data Concurrent of inquiring about described retrogressing page or front form advance send.
The embodiment of the present invention also provides a kind of Webapp route system, and as shown in Figure 2, described system comprises Webapp terminal 21 and Webapp server 22; Wherein,
Described terminal 21, for according to presetting page ID and page parameter, for the virtual page number of different content distributes described point unique separately, and carries the described point information of virtual page number when sending display virtual page number request in the virtual page number URL carried;
Described Webapp server 22, for the display virtual page number request that receiving terminal 21 sends, judge whether described URL carries described point information, if carried, then according to the page ID in described described point information or according to page ID and page parameter, the information of the inquiry respective virtual page returns to described terminal 21; Otherwise inquiry is preset the information of initial page and is returned to described terminal 21.
Described Webapp server 22 comprises: transceiver module 221 and enquiry module 222; Wherein,
Described transceiver module 221, for showing virtual page number request, described request carries the URL of virtual page number;
Described enquiry module 222, for judging whether described URL carries described point information, if carried, then according to the page ID in described described point information or according to page ID and page parameter, the information of the inquiry respective virtual page, otherwise the information of initial page is preset to inquiry;
Described transceiver module 221 also for, send described enquiry module 222 and inquire about the information of gained virtual page number or the information of initial page.
Described Webapp server 22 also comprises:
Mapping block 223, for the page structure of page ID and described virtual page number of setting up virtual page number and the mapping relations of content of pages data-interface, or set up the mapping relations of the page ID of virtual page number and the page structure of page parameter and described virtual page number and content of pages data-interface;
Accordingly, described enquiry module 222, also for the page ID in described described point information for index, in the mapping relations that described mapping block 223 is set up, inquire about corresponding page structure and content of pages data-interface, and inquire about corresponding content of pages data by described content of pages data-interface; Or, with the page ID in described described point information and page parameter for index, in the mapping relations that described mapping block 223 is set up, inquire about corresponding page structure and content of pages data-interface, and inquire about corresponding content of pages data by described content of pages data-interface.
Described Webapp server 22 also comprises:
Monitoring modular 224, whether the described point information of carrying for monitoring virtual page number URL changes, and determining that described point information sends described change described point information when changing is to described enquiry module 222;
Accordingly, described enquiry module 222, also for according to the page ID in the described point information of described monitoring modular 224 transmission or according to page ID and page parameter, inquires about page structure and the content of pages data of described virtual page number;
Described transceiver module 221, page structure and content of pages data also for described enquiry module 222 being inquired about gained are sent to described terminal 21.
Described monitoring modular 224, also for when monitoring the described point information change that virtual page number URL carries, the sequencing changed according to described described point information stores described described point information;
Accordingly, described enquiry module 222, time also for receiving the request of the retrogressing page of the display current virtual page or front form advance at described transceiver module 221, the described point information stored according to described monitoring modular 224 and the sequencing of change thereof, determine page ID in described retrogressing page or described point information corresponding to front form advance or page ID and page parameter, according to described page ID or according to page ID and page parameter, inquire about page structure and the content of pages data of described retrogressing page or front form advance;
Described transceiver module 221, also for the page structure of described retrogressing page or front form advance and content of pages data are sent to described terminal 21.
Described Webapp server 22 also comprises:
Cache module 225, inquires about the information of the initial page of gained and/or the information of virtual page number for enquiry module described in buffer memory 222.
Cache module 225 is also for before the page structure of inquiring about described retrogressing page or front form advance at described enquiry module 222 and content of pages data, cache module 225 inquires about the page structure and content of pages data that self whether are cached with described retrogressing page or front form advance, if buffer memory, then send the described retrogressing page of buffer memory or the page structure of front form advance and content of pages data to described terminal 21 by described transceiver module 221; Otherwise, indicate described enquiry module 222 to inquire about page structure and the content of pages data of described retrogressing page or front form advance.
Described Webapp terminal 21 comprises: sending module 211 and receiver module 212, wherein,
Sending module 211, for sending the request of display virtual page number, described request carries the URL of virtual page number, and described URL carries described point information, and described described point information comprises page ID or comprises page ID and page parameter;
Described receiver module 212, for receiving the information of virtual page number.
Described Webapp terminal 21 also comprises: distribution module 213, for according to the page ID preset and page parameter, for the virtual page number of different content distributes described point information unique separately.
It should be noted that, in actual applications, the function of above-mentioned server side also can be realized by the particular Web app route device being positioned at server internal or outside.
Elaborate the Webapp method for routing being participated in realization by Webapp route device below more in conjunction with specific embodiments.
Webapp route device obtains the realization flow schematic diagram of the data of virtual page number A as shown in Figure 3 a for terminal first, comprising:
Step 301a: the display virtual page number request that receiving terminal sends, described request carries the URL of virtual page number A;
Step 302 ~ step 304: judge whether described URL carries described point information, if carried, then according to the page ID in described described point information or according to page ID and page parameter, the data to Web server request virtual page number A return to described terminal; Otherwise, preset the information of initial page to Web server request and return to described terminal.
The setup code of the Webapp route device of corresponding above-mentioned steps is as follows:
In function init (), whether initHashNav () supports hashchange event for sense terminals, if supported, be then terminal binding hashchange event and hashChangeHandler (), using the monitor of hashChangeHandler () as hashchange event, when terminal triggers hashchange event by the described point information of hashChangeHandler () for terminal storage virtual page number URL, and call the information of assignPage () for terminal request virtual page number by hashChangeHandler (); Otherwise, whether changed by the described point information of chechHash () periodicity monitoring terminal virtual page number URL, because terminal in step 301a asks the information of virtual page number first, namely Webapp route device gets the described point information of the URL of virtual page A first, therefore can not trigger hashchange event, correlative code is as follows:
In assignPage (), first from the URL that the display virtual page number request of terminal is carried, obtain the page ID (PageId namely in code) of virtual page number A, or page ID and page parameter (urlParams namely in code), if the page ID got is null value, then represent that described URL does not carry described point information, then obtain by calling require () data presetting initial page " HOMEPAGE "; If the page ID got is for null value, then by calling require () according to acquisition page ID (PageId namely in code), or page ID and data corresponding to page parameter, require () correlative code is as follows:
The current virtual page is A, and when terminal use clicks the link of virtual page number B, Webapp route device is that terminal obtains the realization flow figure of the data of virtual page number B as shown in Figure 3 a, comprising:
Step 301b: terminal triggers hashchange event, and Webapp route device monitors new URL;
Step 302 ~ step 304: judge whether described URL carries described point information, if carried, then according to the page ID in described described point information or according to page ID and page parameter, the information to Web server request virtual page number A returns to described terminal; Otherwise, preset the information of initial page to Web server request and return to described terminal.
Wherein, URL in step 301b is the URL of virtual page number B, because above-mentioned initHashNav () has bound hashchange event and hashChangeHandler () when initialization, accordingly, hashchange event can be triggered when the link corresponding at virtual page number A click virtual page number B, therefore hashChangeHandler () will be performed, namely the described point information of the URL of virtual page number A is preserved, and call the data that assignPage () asks virtual page number B, hashChangeHandler () correlative code is as follows:
In above-mentioned code, obtained the described point information of virtual page number B by location.hash, and by the described point information of virtual page number A stored in array ohasHistory [0], the length of array ohasHistory is specified by HISTORYLENGTH.
Power function in the present embodiment in Webapp route device code is concrete as shown in Figure 3 b, comprising: initHashNav (), assignPage (), hashChangeHandler () and chechHash (); Wherein,
InitHashNav (), hashchange event whether is supported for sense terminals, if supported, then at terminal binding hashchange event and hashChangeHandler (), the described point information being terminal storage virtual page number URL by hashChangeHandler () when terminal triggers hashchange event, and call the information of assignPage () for terminal acquisition virtual page number by hashChangeHandler (); Otherwise, whether changed by the described point information of chechHash () periodicity monitoring terminal virtual page number URL;
In order to make Webapp route device functional realiey more flexible, when binding has hchange event and hashChangeHandler () by initHashNav (), the monitor hashChangeHandler () of has hchange event can also be added by addHashListener (), deleted the monitor hashChangeHandler () of hc hange event by removeHashListener ().
Webapp route device described in the embodiment of the present invention can, as independently equipment in network, carry out alternately with terminal and Web server; Also can as the built-in module of terminal or Web server.
If module integrated described in the embodiment of the present invention using the form of software function module realize and as independently production marketing or use time, also can be stored in a computer read/write memory medium.Based on such understanding, the technical scheme of the embodiment of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in a storage medium, comprises some instructions and performs all or part of of method described in each embodiment of the present invention in order to make a computer equipment (can be personal computer, server or the network equipment etc.).And aforesaid storage medium comprises: USB flash disk, portable hard drive, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. various can be program code stored medium.Like this, the embodiment of the present invention is not restricted to any specific hardware and software combination.
Accordingly, the embodiment of the present invention also provides a kind of computer-readable storage medium, wherein stores computer program, and this computer program is for performing the method for the Webapp route of the embodiment of the present invention.
The above, be only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.

Claims (13)

1. a method for network application Webapp route, is characterized in that, described method comprises:
Receive the request of display virtual page number, described request carries the uniform resource position mark URL of virtual page number;
Judge whether described URL carries described point information, if carried, then according to the page sequence number ID in described described point information or according to page ID and page parameter, inquire about the information of the respective virtual page and send; Otherwise inquiry is preset the information of initial page and is sent.
2. the method for Webapp route according to claim 1, it is characterized in that, described method also comprises:
Set up the mapping relations of the page ID of virtual page number and the page structure of described virtual page number and content of pages data-interface, or set up the mapping relations of the page ID of virtual page number and the page structure of page parameter and described virtual page number and content of pages data-interface;
Described according to the page ID in described point information or according to page ID and page parameter, the information of the inquiry respective virtual page, comprising:
With the page ID in described described point information for index, in the mapping relations set up, inquire about corresponding page structure and content of pages data-interface, and inquire about corresponding content of pages data by described content of pages data-interface; Or
With the page ID in described described point information and page parameter for index, in the mapping relations of described foundation, inquire about corresponding page structure and content of pages data-interface, and by the content of pages data of described content of pages data-interface inquiry correspondence.
3. the method for Webapp route according to claim 1, it is characterized in that, described method also comprises:
Whether the described point information that monitoring virtual page number URL carries changes, and when determining that described point information changes, according to the page ID in the described point information after change or according to page ID and page parameter, page structure and the content of pages Data Concurrent of the inquiry respective virtual page send.
4. the method for Webapp route according to claim 1,2 or 3, it is characterized in that, described method also comprises: monitor described point information that virtual page number URL carries when changing, the sequencing changed according to described described point information stores described described point information;
Described method also comprises: when the request receiving retrogressing page or the front form advance showing the current virtual page, page ID in described retrogressing page or described point information corresponding to front form advance or page ID and page parameter is determined according to the described point information of described storage and the sequencing of change thereof, and according to the page ID in the described point information of correspondence or according to page ID and page parameter, page structure and the content of pages Data Concurrent of inquiring about described retrogressing page or front form advance send.
5. the method for Webapp route according to claim 4, it is characterized in that, described according to the page ID in the described point information of correspondence or according to page ID and page parameter, before the page structure inquiring about described retrogressing page or front form advance and content of pages data, described method also comprises:
Judge whether the page structure and the content of pages data that retreat page or front form advance described in buffer memory, if buffer memory, then send the described retrogressing page of buffer memory or the page structure of front form advance and content of pages data; Otherwise according to the page ID in the described point information of correspondence or according to page ID and page parameter, page structure and the content of pages Data Concurrent of inquiring about described retrogressing page or front form advance send.
6. a network application Webapp server, is characterized in that, comprising: transceiver module and enquiry module,
Described transceiver module, for receiving the request of display virtual page number, described request carries the uniform resource position mark URL of virtual page number;
Described enquiry module, for judging whether described URL carries described point information, if carried, then according to the page sequence number ID in described described point information or according to page ID and page parameter, the information of the inquiry respective virtual page, otherwise the information of initial page is preset in inquiry;
Described transceiver module also for, send the information of described enquiry module inquiry gained virtual page number or the information of initial page.
7. Webapp server according to claim 6, it is characterized in that, described server also comprises:
Mapping block, for the page structure of page ID and described virtual page number of setting up virtual page number and the mapping relations of content of pages data-interface, or set up the mapping relations of the page ID of virtual page number and the page structure of page parameter and described virtual page number and content of pages data-interface;
Described enquiry module, also for the page ID in described described point information for index, in the mapping relations that described mapping block is set up, inquire about corresponding page structure and content of pages data-interface, and inquire about corresponding content of pages data by described content of pages data-interface; Or, with the page ID in described described point information and page parameter for index, in the mapping relations that described mapping block is set up, inquire about corresponding page structure and content of pages data-interface, and inquire about corresponding content of pages data by described content of pages data-interface.
8. Webapp server according to claim 6, it is characterized in that, described server also comprises:
Monitoring modular, whether the described point information of carrying for monitoring virtual page number URL changes, and the described point information after changing that sends when determining that described point information changes is to described enquiry module;
Described enquiry module, also for the page ID in the described point information that sends according to described monitoring modular or according to page ID and page parameter, inquires about page structure and the content of pages data of described virtual page number;
Described transceiver module, also for sending page structure and the content of pages data of described enquiry module inquiry gained.
9. Webapp server according to claim 8, is characterized in that,
Described monitoring modular, also for when monitoring the described point information change that virtual page number URL carries, the sequencing changed according to described described point information stores described described point information;
Described enquiry module, time also for receiving the request of the retrogressing page of the display current virtual page or front form advance at described transceiver module, the described point information stored according to described monitoring modular and the sequencing of change thereof, determine page ID in described retrogressing page or described point information corresponding to front form advance or page ID and page parameter, according to described page ID or according to page ID and page parameter, inquire about page structure and the content of pages data of described retrogressing page or front form advance;
Described transceiver module, also for sending page structure and the content of pages data of described retrogressing page or front form advance.
10. Webapp server according to any one of claim 6 to 9, is characterized in that, described server also comprises: cache module, for the information of initial page and/or the information of virtual page number of enquiry module inquiry gained described in buffer memory;
Also for before the page structure of inquiring about described retrogressing page or front form advance at described enquiry module and content of pages data, whether described cache module inquiry self is cached with page structure and the content of pages data of described retrogressing page or front form advance, if buffer memory, then send the described retrogressing page of buffer memory or the page structure of front form advance and content of pages data by described transceiver module; Otherwise, indicate described enquiry module to inquire about page structure and the content of pages data of described retrogressing page or front form advance.
11. 1 kinds of network application Webapp terminals, is characterized in that, comprising: sending module and receiver module,
Described sending module, for sending the request of display virtual page number, described request carries the uniform resource position mark URL of virtual page number, and described URL carries described point information, and described described point information comprises page sequence number ID or comprises page ID and page parameter;
Described receiver module, for receiving the information of virtual page number.
12., according to Webapp terminal described in claim 11, is characterized in that, described terminal also comprises: distribution module, for according to the page ID preset and page parameter, for the virtual page number of different content distributes described point information unique separately.
13. 1 kinds of network application Webapp route systems, is characterized in that, described system comprises the Webapp server described in any one of claim 6-10 and the Webapp terminal described in claim 11 or 12.
CN201310282453.3A 2013-07-05 2013-07-05 Use method, server, terminal and system for Webapp router Pending CN104283920A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310282453.3A CN104283920A (en) 2013-07-05 2013-07-05 Use method, server, terminal and system for Webapp router

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310282453.3A CN104283920A (en) 2013-07-05 2013-07-05 Use method, server, terminal and system for Webapp router

Publications (1)

Publication Number Publication Date
CN104283920A true CN104283920A (en) 2015-01-14

Family

ID=52258398

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310282453.3A Pending CN104283920A (en) 2013-07-05 2013-07-05 Use method, server, terminal and system for Webapp router

Country Status (1)

Country Link
CN (1) CN104283920A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815006A (en) * 2015-11-30 2017-06-09 五八同城信息技术有限公司 Page invocation method, device and page management server
CN106919620A (en) * 2015-12-28 2017-07-04 北京国双科技有限公司 Single-page processing method and processing device
CN107800562A (en) * 2017-02-16 2018-03-13 平安科技(深圳)有限公司 The method for configuring route and device of a kind of view file
CN108337317A (en) * 2018-02-09 2018-07-27 马上消费金融股份有限公司 A kind of method and device of processing route requests
CN110427585A (en) * 2019-07-19 2019-11-08 上海易点时空网络有限公司 Page data processing method and device, storage medium suitable for front end routing
CN111625239A (en) * 2020-05-09 2020-09-04 北京仁科互动网络技术有限公司 Method and component for updating virtual page instance state in SPA

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030226136A1 (en) * 2002-05-23 2003-12-04 Patrick Calahan System and method for extending application functionality and content
CN102693280A (en) * 2012-04-28 2012-09-26 广州市动景计算机科技有限公司 Webpage browsing method, WebApp framework, method and device for executing JavaScript, and mobile terminal
CN102918486A (en) * 2010-06-11 2013-02-06 微软公司 WEB application navigation domains
CN102970348A (en) * 2012-11-02 2013-03-13 北京奇虎科技有限公司 Method and system for network application propelling and network application server
CN103051684A (en) * 2012-12-07 2013-04-17 百度在线网络技术(北京)有限公司 Method, system and device for converting website into Web App for displaying

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030226136A1 (en) * 2002-05-23 2003-12-04 Patrick Calahan System and method for extending application functionality and content
CN102918486A (en) * 2010-06-11 2013-02-06 微软公司 WEB application navigation domains
CN102693280A (en) * 2012-04-28 2012-09-26 广州市动景计算机科技有限公司 Webpage browsing method, WebApp framework, method and device for executing JavaScript, and mobile terminal
CN102970348A (en) * 2012-11-02 2013-03-13 北京奇虎科技有限公司 Method and system for network application propelling and network application server
CN103051684A (en) * 2012-12-07 2013-04-17 百度在线网络技术(北京)有限公司 Method, system and device for converting website into Web App for displaying

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815006A (en) * 2015-11-30 2017-06-09 五八同城信息技术有限公司 Page invocation method, device and page management server
CN106919620A (en) * 2015-12-28 2017-07-04 北京国双科技有限公司 Single-page processing method and processing device
CN107800562A (en) * 2017-02-16 2018-03-13 平安科技(深圳)有限公司 The method for configuring route and device of a kind of view file
WO2018149395A1 (en) * 2017-02-16 2018-08-23 平安科技(深圳)有限公司 Routing configuration method for view file, and storage medium, terminal device and apparatus
CN107800562B (en) * 2017-02-16 2019-03-01 平安科技(深圳)有限公司 A kind of method for configuring route and device of view file
US10887171B2 (en) 2017-02-16 2021-01-05 Ping An Technology (Shenzhen) Co., Ltd. Routing configuration method of view files, storage medium, terminal device and apparatus
CN108337317A (en) * 2018-02-09 2018-07-27 马上消费金融股份有限公司 A kind of method and device of processing route requests
CN110427585A (en) * 2019-07-19 2019-11-08 上海易点时空网络有限公司 Page data processing method and device, storage medium suitable for front end routing
CN111625239A (en) * 2020-05-09 2020-09-04 北京仁科互动网络技术有限公司 Method and component for updating virtual page instance state in SPA

Similar Documents

Publication Publication Date Title
CN104283920A (en) Use method, server, terminal and system for Webapp router
JP5230642B2 (en) Web page display method and system
CN102752288B (en) Method and device for identifying network access action
CN102783119B (en) Access control method and system, and access terminal
CN101510874B (en) Setup system and method for network connection, network communication tool and method
CN101674329B (en) Internet access method and Internet access system
CN104572777B (en) Webpage loading method and device based on UIWebView component
CN103500204B (en) A kind of web page browsing backing method, web page server and client
CN103440276A (en) Method and device for improving webpage display speed
CN105095280A (en) Caching method and apparatus for browser
CN102710535B (en) A kind of data capture method and equipment
CN104468852A (en) Method, device and system for client to select IP link address
CN102510410A (en) On-line advertisement delivering method and system as well as advertisement control equipment
CN105306609A (en) Network loading processing method and device
CN105512227A (en) Webpage data loading method and system
CN101799821A (en) Method and system for realizing webpage application by widget
CN101115064A (en) Network data storing, obtaining method and its implementing device
CN106557584A (en) A kind of web site collection method and device
CN104615771A (en) Webpage data acquiring method and device
CN103338278A (en) Accelerating method and device for web page browsing
CN103618799A (en) Browser caching processing method and system and proxy server
CN103379163B (en) A kind of defining method of business object and determining device
CN105556918A (en) Resource downloading method, electronic device, and apparatus
CN105338013B (en) A kind of network loading method and device
CN103440281A (en) Method, device and equipment for acquiring download file

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20150114

RJ01 Rejection of invention patent application after publication