CN104298494A - Browsing method and device based on JS framework - Google Patents

Browsing method and device based on JS framework Download PDF

Info

Publication number
CN104298494A
CN104298494A CN201310304960.2A CN201310304960A CN104298494A CN 104298494 A CN104298494 A CN 104298494A CN 201310304960 A CN201310304960 A CN 201310304960A CN 104298494 A CN104298494 A CN 104298494A
Authority
CN
China
Prior art keywords
page
javascript
framework
browser
module
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
CN201310304960.2A
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.)
Shenzhen Coship Electronics Co Ltd
Original Assignee
Shenzhen Coship Electronics 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 Shenzhen Coship Electronics Co Ltd filed Critical Shenzhen Coship Electronics Co Ltd
Priority to CN201310304960.2A priority Critical patent/CN104298494A/en
Publication of CN104298494A publication Critical patent/CN104298494A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a browsing method based on a JS framework. The method comprises the steps that the Javascript framework is operated, wherein the Javascript framework manages interactive communication between multiple label pages and interactive communication between a non-browser module and a server; a first operation instruction is received, and the Javascript framework calls a browser to have access to the corresponding page according to the first operation instruction. The invention further discloses a browsing device based on the JS framework. The browsing device comprises an operation module and a receiving module, wherein the operation module is used for operating the Javascript framework which manages the interactive communication between the multiple label pages and interactive communication between the non-browser module and the server; the receiving module is used for receiving the first operation instruction, and the Javascript framework calls a browser to have access to the corresponding page according to the first operation instruction. The browsing method and device can effectively achieve the basic functions of the browser on the Javascript framework and control interactive communication between the pages of the browser, so that users control the Web pages of the browser more conveniently.

Description

A kind of browsing method based on JS framework and browsing apparatus
Technical field
The present invention relates to browser technology field, particularly relate to a kind of browsing method based on JS framework and browsing apparatus.
Background technology
The English full name of JS(, Javascript) be widely used in a kind of script in Web page exploitation, the Javascript of standard may operate in the browser of all main flows (Javascript be a kind of based on object and event-driven and there is the client-side scripting language of relative safety).Write a framework based on Javascript, the browsing pages function of browser is gone based on this framework, the transmission of message before browser multi-page can be facilitated, and the management of front end page.
At present, browser-cross Javascirpt debug system and method is realized in enterprise Web application system, such as application publication number: CN 101719093A, the patent of invention of Shen Qing Publication date: 2010.06.02, relate in a kind of enterprise Web application system in this invention and realize cross-browser Javascript debugging system, comprise graphical Javascript debug platform and cross-browser Javascript debugging framework.Realize browser-cross Javascirpt debug system and method proposition Javascript in enterprise Web application system and do the execution that a framework realizes debugging Web page, utilize long-range http server module to communicate with browser, Web Application Server and local file system.Reached the synchronous Ajax request of receiver by debugging server, Debugging message is sent to the debugging code of browser execution.But its shortcoming one of above-mentioned technology is, synchronous Ajax request can block the thread of browser, browser execution can be caused to slow, affect the experience of user; Its shortcoming two is, the method Javascript realizes the ruuning situation of Web page of the current operation of debugging, but does not relate to how to realize controlling between browser multi-page by Javascript framework mutual.In addition, for the page of front end as Baidu, user wishes to point out user more information by simple mode in this page, and such as, other module in running browser equipment has the information of prompting user to wish to convey to the user browsing Baidu easily.
Summary of the invention
How to control the interactive communication between browser page and the interactive communication between non-browser module and server to solve, more convenient user controls the technical matters of the Web page of browser, the invention provides following technical scheme.
The invention provides a kind of browsing method based on Javascript framework, comprising:
Run Javascript framework, described Javascript framework manages the interactive communication between many labels page and the interactive communication between non-browser module and server;
Receive the first operational order, described Javascript framework calls browser access respective page according to described first operational order.
Preferably, described reception first operational order, the step that described Javascript framework calls browser access respective page according to described first operational order is specially:
Receive access network address URL command information, described Javascript framework calls browser access respective page according to described access network address URL command information.
Preferably, the interactive communication step that described Javascript framework manages between many labels page specifically comprises:
Expansion Javascript interface, according to the newly-built N number of page of reception instruction calls browser, and identified page 1, the page 2 ... page N-1, page N;
According to the page 1, the page 2 ... page N-1, page N and the identifying information expanding Javascript interface, described Javascript framework dispatch messages is on the page of specifying.
Preferably, the step of the interactive communication between described Javascript framework management non-browser module and server specifically comprises:
Expansion Javascript interface, receives the message instruction that non-browser module sends;
According to described message instruction type, any page of accessing user is pointed out.
Preferably, described browsing method comprises further: the Javascript extended method under encapsulation Javascript framework.
In order to solve technical matters of the present invention, the present invention also provides a kind of browsing apparatus based on Javascript framework, and described browsing apparatus both comprised:
Run module, for running Javascript framework, described Javascript framework manages the interactive communication between many labels page and the interactive communication between non-browser module and server;
Receiver module, for receiving the first operational order, described Javascript framework calls browser access respective page according to described first operational order.
Preferably, described browsing apparatus comprises further:
First expansion module, for expanding Javascript interface, according to the newly-built N number of page of reception instruction calls browser, and identified page 1, the page 2 ... page N-1, page N;
First information interactive module, for according to the page 1, the page 2 ... page N-1, page N and the identifying information expanding Javascript interface, described Javascript framework dispatch messages is on the page of specifying.
Preferably, described browsing apparatus comprises further:
Second expansion module, for expanding Javascript interface, receives the message instruction that non-browser module sends;
Second information interaction module, for according to described message instruction type, any page of accessing user is pointed out.
Preferably, described browsing apparatus further comprises:
Package module, for encapsulating the Javascript extended method under Javascript framework.
The present invention is by running Javascript framework, and described Javascript framework manages the interactive communication between many labels page and the interactive communication between non-browser module and server; Receive the first operational order, described Javascript framework calls the technological means of browser access respective page according to described first operational order, the effective basic function realizing browser on Javascript framework, and the interactive communication controlled between browser page, more convenient user controls the technical matters of the Web page of browser.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the first schematic diagram of a kind of browsing method based on Javascript framework of the embodiment of the present invention;
Fig. 2 is the second schematic diagram of a kind of browsing method based on Javascript framework of the embodiment of the present invention;
Fig. 3 is the schematic diagram of a kind of multi-page information interaction based on Javascript framework of the embodiment of the present invention;
Fig. 4 is the mutual schematic diagram of a kind of non-browser based on Javascript framework of the embodiment of the present invention and server info;
Fig. 5 is a schematic diagram of a kind of browsing apparatus based on Javascript framework of the embodiment of the present invention;
Fig. 6 is two schematic diagram of a kind of browsing apparatus based on Javascript framework of the embodiment of the present invention.
Embodiment
In order to make technical matters to be solved by this invention, technical scheme and beneficial effect clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.
Please refer to Fig. 1, Fig. 1 is the schematic diagram of a kind of browsing method based on Javascript framework of the present invention.
In the present embodiment, mainly comprise the steps:
Step S101, run Javascript framework, described Javascript framework manages the interactive communication between many labels page and the interactive communication between non-browser module and server.
Concrete, realize a framework with Javascript, first run this framework when browser execution gets up, but for user, the main interface of browser is the same.User at input network address URL(URL, Uniform Resource Locator, URL(uniform resource locator)) time, first transfer to the process of Javascript framework, that calls browser by it opens the network address URL page.
Step S102, receives the first operational order, and described Javascript framework calls browser access respective page according to described first operational order.
Concrete, described reception first operational order, the step that described Javascript framework calls browser access respective page according to described first operational order is specially: receive access network address URL command information, described Javascript framework calls browser access respective page according to described access network address URL command information.
Detailed, after adding Javascript framework, browser still can realize the process of the normal browsing page and operation pages.Concrete, please refer to Fig. 2, Fig. 2 is two schematic diagram of a kind of browsing method based on Javascript framework of the embodiment of the present invention.
Step S1021, running browser, starts Javascript framework;
Step S1022, user inputs network address URL;
After step S1023, Javacript framework receives network address URL, call the page that network address URL sensing opened by browser;
Step S1024, receives the command information that user uses mouse and keyboard operation input;
Step S1025, described operation instruction information is sent to Javascript framework by browser;
Step S1026, judges, whether there is multi-page;
Step S1027, if there is multi-page, then the above-mentioned operation instruction information opening the network address page is then sent to the current page being in focus by Javascript framework, and the current page being in focus normally uses browser browsing pages and operation pages, until whole operating process terminates;
Step S1028, if there is no multi-page, then Javascript framework directly sends to current page;
Step S1029, the corresponding message of page process, until whole operating process terminates.
Fig. 2 above illustrates, and after adding Javascript framework, can browser still realize the function of browsing pages and the normal running page, do not hinder normal browsing function.
Refer to Fig. 3, Fig. 3 is the schematic diagram of a kind of multi-page information interaction based on Javascript framework of the embodiment of the present invention;
Concrete, the interactive communication step that described Javascript framework manages between many labels page specifically comprises:
Step S201, running browser, starts Javascript framework;
Step S202, expansion Javascript interface, according to the newly-built N number of page of reception instruction calls browser, and identified page 1, the page 2 ... page N-1, page N;
Concrete, described expansion Javascript interface, according to the newly-built N number of page of reception instruction calls browser, and identified page 1, the page 2 ... the step of page N-1, page N comprises further: expansion Javascript interface, according to the newly-built N number of page of reception instruction calls browser, further identified page 1, the page 2 ... the network address URL information of page N-1, page N.
Step S203, according to the page 1, the page 2 ... page N-1, page N and the identifying information expanding Javascript interface, described Javascript framework dispatch messages is to the page of specifying.
To sum up, need expansion Javascript interface in Javascript framework, for the multi-page of managing and browsing device, namely browser Javascript interface that the information of multi-page is expanded therewith framework communicate, comprise the title of the page, the page works as the information such as the network address URL of front opening.By after the expansion interface identification in framework between the page 1 and the page 2, by framework dispatch messages on the page of specifying, to be so no matter that the message sent by which page can be sent in the page of specifying easily.
Refer to Fig. 4, Fig. 4 is the schematic diagram of a kind of multi-page information interaction based on Javascript framework of the embodiment of the present invention;
Concrete, the step of the interactive communication between described Javascript framework management non-browser module and server specifically comprises:
Step S301, running browser, starts Javascript framework;
Step S302, expansion Javascript interface, receives the message instruction that non-browser module sends;
Step S303, according to described message instruction type, any page of accessing user is pointed out.
To sum up, user increases in the frame when customizing browser needs message to be processed.In other non-browser module, if when having message to need to point out to user, send message directly to browser.After message is sent to Javascript framework, Javascrip framework can do corresponding process according to the type of message, arrive as pointed out the business hours of customization, this framework can be pointed out in any page of user's access, solves the demand needing information in the uncontrollable page in access front end.Be that user, now just at browsing pages, directly does at browser status the process that lower prompting relevant information does not affect other by the benefit of Javascrip framework process, and point out exploitation very convenient by the mode of Javascript message, fast.
Preferably, described browsing method, further comprises: the Javascript extended method under encapsulation Javascript framework.Browser directly runs on this Javascript framework, and does not need to increase browser quoting Javascript extended method.
Refer to Fig. 5, Fig. 5 is a schematic diagram of a kind of browsing apparatus based on Javascript framework of the embodiment of the present invention;
A kind of browsing apparatus based on Javascript framework, described browsing apparatus 1 comprises: run module 11, for running Javascript framework, described Javascript framework manages the interactive communication between many labels page and the interactive communication between non-browser module and server; Receiver module 12, for receiving the first operational order, described Javascript framework calls browser access respective page according to described first operational order.Concrete, realize a framework with Javascript, first run this framework when browser execution gets up, but for user, the main interface of browser is the same.User, when inputting network address URL, first transfers to the process of Javascript framework, and that calls browser by it opens the network address URL page.
Preferably, described browsing apparatus 1 comprises further: the first expansion module 13, for expanding Javascript interface, according to the newly-built N number of page of reception instruction calls browser, and identified page 1, the page 2 ... page N-1, page N; First information interactive module 14, for according to the page 1, the page 2 ... page N-1, page N and the identifying information expanding Javascript interface, described Javascript framework dispatch messages is on the page of specifying.Concrete, need expansion Javascript interface in Javascript framework, for the multi-page of managing and browsing device, namely browser Javascrip interface that the information of multi-page is expanded therewith framework communicate, comprise the title of the page, the page works as the information such as the network address URL of front opening.By after the expansion interface identification in framework between the page 1 and the page 2, by framework dispatch messages on the page of specifying, to be so no matter that the message sent by which page can be sent in the page of specifying easily
Preferably, described browsing apparatus 1 comprises further: package module 17, for encapsulating the Javascript extended method under Javascript framework.
Refer to Fig. 6, Fig. 6 is two schematic diagram of a kind of browsing apparatus based on Javascript framework of the embodiment of the present invention;
A kind of browsing apparatus based on Javascript framework, described browsing apparatus 1 comprises: run module 11, for running Javascript framework, described Javascript framework manages the interactive communication between many labels page and the interactive communication between non-browser module and server; Receiver module 12, for receiving the first operational order, described Javascript framework calls browser access respective page according to described first operational order.Concrete, realize a framework with Javascript, first run this framework when browser execution gets up, but for user, the main interface of browser is the same.User, when inputting network address URL, first transfers to the process of Javascript framework, and that calls browser by it opens the network address URL page.
Preferably, described browsing apparatus 1 comprises further: the second expansion module 15, for expanding Javascript interface, receives the message instruction that non-browser module sends; Second information interaction module 16, for according to described message instruction type, any page of accessing user is pointed out.Concrete, user increases in the frame when customizing browser needs message to be processed.In other non-browser module, if when having message to need to point out to user, send message directly to browser.After message is sent to Javascript framework, Javascrip framework can do corresponding process according to the type of message, arrive as pointed out the business hours of customization, this framework can be pointed out in any page of user's access, solves the demand needing information in the uncontrollable page in access front end.Be that user, now just at browsing pages, directly does at browser status the process that lower prompting relevant information does not affect other by the benefit of Javascrip framework process, and point out exploitation very convenient by the mode of Javascript message, fast.
Preferably, described browsing apparatus 1 comprises further: package module 17, for encapsulating the Javascript extended method under Javascript framework.
The above disclosed preferred embodiment be only in the embodiment of the present invention, certainly can not limit the interest field of the present invention, therefore according to the equivalent variations that the claims in the present invention are done, still belong to the scope that the present invention is contained with this.

Claims (10)

1. based on a browsing method for Javascript framework, it is characterized in that, comprising:
Run Javascript framework, described Javascript framework manages the interactive communication between many labels page and the interactive communication between non-browser module and server;
Receive the first operational order, described Javascript framework calls browser access respective page according to described first operational order.
2. browsing method as claimed in claim 1, it is characterized in that, described reception first operational order, the step that described Javascript framework calls browser access respective page according to described first operational order is specially:
Receive access network address URL command information, described Javascript framework calls browser access respective page according to described access network address URL command information.
3. browsing method as claimed in claim 1 or 2, it is characterized in that, the interactive communication step that described Javascript framework manages between many labels page specifically comprises:
Expansion Javascript interface, according to the newly-built N number of page of reception instruction calls browser, and identified page 1, the page 2 ... page N-1, page N;
According to the page 1, the page 2 ... page N-1, page N and the identifying information expanding Javascript interface, described Javascript framework dispatch messages is on the page of specifying.
4. browsing method as claimed in claim 3, body characteristics is: described expansion Javascript interface, according to the newly-built N number of page of reception instruction calls browser, and identified page 1, the page 2 ... page N-1, the step of page N comprises further:
Expansion Javascript interface, according to the newly-built N number of page of reception instruction calls browser, further identified page 1, the page 2 ... the network address URL information of page N-1, page N.
5. browsing method as claimed in claim 1 or 2, is characterized in that, the step of the interactive communication between described Javascript framework management non-browser module and server specifically comprises:
Expansion Javascript interface, receives the message instruction that non-browser module sends;
According to described message instruction type, any page of accessing user is pointed out.
6. browsing method as claimed in claim 1, is characterized in that, also comprise:
Javascript extended method under encapsulation Javascript framework.
7. based on a browsing apparatus for Javascript framework, it is characterized in that, described browsing apparatus both comprised:
Run module, for running Javascript framework, described Javascript framework manages the interactive communication between many labels page and the interactive communication between non-browser module and server;
Receiver module, for receiving the first operational order, described Javascript framework calls browser access respective page according to described first operational order.
8. browsing apparatus as claimed in claim 7, it is characterized in that, described browsing apparatus comprises further:
First expansion module, for expanding Javascript interface, according to the newly-built N number of page of reception instruction calls browser, and identified page 1, the page 2 ... page N-1, page N;
First information interactive module, for according to the page 1, the page 2 ... page N-1, page N and the identifying information expanding Javascript interface, described Javascript framework dispatch messages is on the page of specifying.
9. browsing apparatus as claimed in claim 7, it is characterized in that, described browsing apparatus comprises further:
Second expansion module, for expanding Javascript interface, receives the message instruction that non-browser module sends;
Second information interaction module, for according to described message instruction type, any page of accessing user is pointed out.
10. browsing apparatus as claimed in claim 7, is characterized in that:
Package module, for encapsulating the Javascript extended method under Javascript framework.
CN201310304960.2A 2013-07-19 2013-07-19 Browsing method and device based on JS framework Pending CN104298494A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310304960.2A CN104298494A (en) 2013-07-19 2013-07-19 Browsing method and device based on JS framework

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310304960.2A CN104298494A (en) 2013-07-19 2013-07-19 Browsing method and device based on JS framework

Publications (1)

Publication Number Publication Date
CN104298494A true CN104298494A (en) 2015-01-21

Family

ID=52318238

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310304960.2A Pending CN104298494A (en) 2013-07-19 2013-07-19 Browsing method and device based on JS framework

Country Status (1)

Country Link
CN (1) CN104298494A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1987851A (en) * 2005-12-22 2007-06-27 腾讯科技(深圳)有限公司 Updating display method for webpage data
GB2453442A (en) * 2007-10-04 2009-04-08 Cvon Innovations Ltd Associating advertisements with Web or WAP pages
CN102323880A (en) * 2011-06-30 2012-01-18 中兴通讯股份有限公司 Mobile phone application interface development method and terminal based on browser parsing mode
CN102567125A (en) * 2011-12-28 2012-07-11 中标软件有限公司 Method for realizing communication between browser pages
CN103067777A (en) * 2012-12-24 2013-04-24 深圳Tcl新技术有限公司 Method and device of prompting of network state

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1987851A (en) * 2005-12-22 2007-06-27 腾讯科技(深圳)有限公司 Updating display method for webpage data
GB2453442A (en) * 2007-10-04 2009-04-08 Cvon Innovations Ltd Associating advertisements with Web or WAP pages
CN102323880A (en) * 2011-06-30 2012-01-18 中兴通讯股份有限公司 Mobile phone application interface development method and terminal based on browser parsing mode
CN102567125A (en) * 2011-12-28 2012-07-11 中标软件有限公司 Method for realizing communication between browser pages
CN103067777A (en) * 2012-12-24 2013-04-24 深圳Tcl新技术有限公司 Method and device of prompting of network state

Similar Documents

Publication Publication Date Title
CN102819451B (en) A kind of browser plug-in call method and system
CN107844324B (en) Client page jump processing method and device
US20110138074A1 (en) Content distribution management device, terminal, program, and content distribution system
US20220060558A1 (en) Systems and Methods for Platform-Independent Application Publishing to a Front-End Interface
KR20230070067A (en) System and method for displaying multiple applications
US9563449B2 (en) Mobilizing a web application to take advantage of a native device capability
CN103530160A (en) Page loading method and device
CN103747084A (en) Off-line access method and system for advanced enterprise mobile application platform
CN105260444A (en) Adaptive data display method, terminal device and server
CN102904959A (en) Network accelerating method and gateway
CN102298599A (en) Method and system for browsing web pages in offline state
US9300610B2 (en) System and method for selecting a file stored on a cloud server
CN103414866A (en) Method for playing on-line audio and on-line video, embedded type multimedia device and television set
CN103747074A (en) Mobile monitoring system on basis of Web server
CN102325225A (en) Method and device for playing video of mobile phone website
CN103473035A (en) Screen capturing method and device
KR20130065777A (en) Apparatus and method for sharing web contents using inspector script
CN103155530A (en) Web-telco convergence comprising downloading script commands to user terminals
CN103856540A (en) Response processing method and device
RU2665240C2 (en) Method and device for page insertion
US10200316B2 (en) Interactions based on instant messaging
CN110505074B (en) Application modularization integration method and device
CN103023765B (en) A kind of message processing method based on script and device
CN105302617A (en) Method and sever for downloading application program
CN104156372A (en) Method, devices and system for opening page

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150121

WD01 Invention patent application deemed withdrawn after publication