CN106155710A - Method that browser is turned off and on, device - Google Patents

Method that browser is turned off and on, device Download PDF

Info

Publication number
CN106155710A
CN106155710A CN201510135408.4A CN201510135408A CN106155710A CN 106155710 A CN106155710 A CN 106155710A CN 201510135408 A CN201510135408 A CN 201510135408A CN 106155710 A CN106155710 A CN 106155710A
Authority
CN
China
Prior art keywords
browser
page
running environment
window
reserved
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.)
Granted
Application number
CN201510135408.4A
Other languages
Chinese (zh)
Other versions
CN106155710B (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.)
Loongson Technology Corp Ltd
Original Assignee
Loongson Technology Corp 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 Loongson Technology Corp Ltd filed Critical Loongson Technology Corp Ltd
Priority to CN201510135408.4A priority Critical patent/CN106155710B/en
Publication of CN106155710A publication Critical patent/CN106155710A/en
Application granted granted Critical
Publication of CN106155710B publication Critical patent/CN106155710B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides method, device that a kind of browser is turned off and on, solve the problem that in prior art, the toggle speed of browser is slower.The method that described browser cuts out includes: detection browser out code;When browser out code being detected, close the active tags page in browser window, and the running environment of reserved browser.The method that described browser starts includes: detection browser enabled instruction;When browser enabled instruction being detected, in the running environment of the browser reserved when upper once browser cuts out, build interface and the function of browser, and load the alternative document needed for browser starts.The embodiment of the present invention is applicable to be actuated for browser accelerating.

Description

Method that browser is turned off and on, device
Technical field
The present invention relates to browser technology field, particularly relate to method, device that a kind of browser is turned off and on.
Background technology
Browser refers to show the HTML(HyperText Markup of web page server or file system Language, HTML) file content, and allow the user's a kind of software with these file interactions.Browser is as desktop application, and its user experience is most important.Browser toggle speed is slow, and user can be allowed to produce the sensation that systematic function is very poor.
The Booting sequence of Firefox browser is: first builds and can perform XUL(XML User Interface Language, extensible markup language users interface languages) and the running environment of JavaScript code, then with the interface of XUL construction procedures, by the function of JavaScript construction procedures.In PC World, the execution speed of binary code ratio explains that execution code is the most a lot.Firefox browser only has the running environment of bottom to have employed binary code, and XUL and JavaScript on upper strata is to explain the code performed.Therefore Firefox browser toggle speed is slower.
For the problem that Firefox browser toggle speed is slow, existing solution is: before Firefox starts, and the file needed for starting moves internal memory from hard disk, then restarts Firefox.So, in Firefox start-up course, it is from in-memory scanning load document rather than to carry out load document by I/O operation from hard disk.The program promotes the toggle speed of Firefox by reducing the I/O read-write operation in Firefox start-up course.
During realizing the present invention, inventor finds at least to exist in prior art following technical problem:
File needed for being started by Firefox moves internal memory from hard disk, to reduce the I/O read-write operation in Firefox start-up course.But according to the Booting sequence of Firefox, I/O read-write operation time accounting in whole start-up course is the least, start time-consuming mainly on the structure of Firefox running environment.Therefore, above-mentioned solution the most substantially promotes the toggle speed of Firefox browser.
Summary of the invention
Method that the browser that the present invention provides is turned off and on, device, it is possible to shorten the startup time of browser, and then effectively promote the toggle speed of browser.
First aspect, the present invention provides a kind of method that browser cuts out, including:
Detection browser out code;
When browser out code being detected, close the active tags page in browser window, and the running environment of reserved browser.
Second aspect, the present invention provides a kind of method that browser starts, including:
Detection browser enabled instruction;
When browser enabled instruction being detected, in the running environment of the browser reserved when upper once browser cuts out, build interface and the function of browser, and load the alternative document needed for browser starts.
The third aspect, the present invention provides the device that a kind of browser cuts out, including:
Close detector unit, be used for detecting browser out code;
Close performance element, for when browser out code being detected, close the active tags page in browser window, and the running environment of reserved browser.
Fourth aspect, the present invention provides the device that a kind of browser starts, including:
Start detector unit, be used for detecting browser enabled instruction;
Start performance element, for when browser enabled instruction being detected, in the running environment of the browser reserved when upper once browser cuts out, build interface and the function of browser, and load the alternative document needed for browser starts.
The embodiment of the present invention provide browser be turned off and on method, device, when browser out code being detected, the running environment of reserved browser, when browser starts next time, in the running environment of the browser reserved when upper once browser cuts out, build interface and the function of browser, and load the alternative document needed for browser starts.Compared with prior art, the present invention reserves the running environment of browser when browser cuts out, and follow-up browser need not rebuild the running environment of browser when starting, such that it is able to shorten the startup time of browser, promotes the toggle speed of browser.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, the accompanying drawing used required in embodiment or description of the prior art will be briefly described below, apparently, accompanying drawing in describing below is only some embodiments of the present invention, for those of ordinary skill in the art, on the premise of not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the flow chart of the embodiment of the method one that browser of the present invention cuts out;
Fig. 2 is the flow chart of the embodiment of the method two that browser of the present invention cuts out;
Fig. 3 is the flow chart of the embodiment of the method one that browser of the present invention starts;
Fig. 4 is the structural representation of the device embodiment one that browser of the present invention cuts out;
Fig. 5 is the structural representation of the device embodiment two that browser of the present invention cuts out;
Fig. 6 is the structural representation of the device embodiment one that browser of the present invention starts.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only a part of embodiment of the present invention rather than whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art are obtained under not making creative work premise, broadly fall into the scope of protection of the invention.
Fig. 1 is the flow chart of the embodiment of the method one that browser of the present invention cuts out, as it is shown in figure 1, the method for the present embodiment includes:
S11, detection browser out code;
Specifically, when user's click browser X button, trigger browser close event, send browser out code.
S12, when browser out code being detected, close the active tags page in browser window, and the running environment of reserved browser.
The method that the browser that the embodiment of the present invention provides cuts out, when browser out code being detected, the running environment of reserved browser, so that when browser starts next time, in the running environment of the browser can reserved when upper once browser cuts out, the interface of direct construction browser and function, and load the alternative document needed for browser starts.Compared with prior art, the present invention reserves the running environment of browser when browser cuts out so that follow-up browser need not rebuild the running environment of browser when starting, such that it is able to shorten the startup time of browser, promotes the toggle speed of browser.
Fig. 2 is the flow chart of the embodiment of the method two that browser of the present invention cuts out, as a example by Firefox browser, as in figure 2 it is shown, the method for the present embodiment includes:
S21, detection browser out code.
Specifically, for Firefox browser, extend the audiomonitor function of the browser close event self realized to Firefox browser registration, such as close_callback_t.When user's click browser X button, triggering browser close event, send browser out code, now, this audiomonitor function will be triggered execution, can monitor browser close event, detection browser out code.
Wherein, the code snippet implementing the method can be:
Services.obs.addObserver(close_callback_t, “quit-application”,false);
Services.obs.addObserver(close_callback_t, “quit-application-granted”,false);
S22, when browser out code being detected, in described browser window add blank tag page.
Specifically, blank tag page can be set by Firefox expansion interface and add instruction, to realize adding blank tag page in browser window.
S23, described blank tag page is set to current active Shipping Options Page.
Specifically, blank tag page can be set by Firefox expansion interface and instruction is set, to realize blank tag page is set to current active Shipping Options Page.
S24, close other active tags pages in addition to described current active Shipping Options Page in described browser window.
Specifically, active tags page can be set by Firefox expansion interface and remove instruction, to realize the closedown to other active tags pages in browser window.
S25, the running environment of reserved browser.
The current active Shipping Options Page arranged by blank tag page in step S23 is retained, closes other active tags pages, do not close the running environment of browser, thus realize the reserved of browser execution environment.
S26, hiding described browser window.
Specifically, browser window can be set by Gtk+ interface and hide instruction, to realize hiding described browser window, make browser window invisible to user.
Fig. 3 is the flow chart of the embodiment of the method one that browser of the present invention starts, as it is shown on figure 3, the method for the present embodiment includes:
S31, detection browser enabled instruction;
Specifically, when user double-clicks browser icon or selected browser icon and browser is opened in selection, trigger browser and start event, send browser enabled instruction.
S32, when browser enabled instruction being detected, in the running environment of the browser reserved when upper once browser cuts out, build the interface of browser and function, and load the alternative document needed for browser starts.
The method that the browser that the embodiment of the present invention provides starts, when browser enabled instruction being detected, in the running environment of the browser reserved when upper once browser cuts out, build interface and the function of browser, and load the alternative document needed for browser starts.Compared with prior art, the running environment of the browser that browser can be reserved when upper once browser cuts out directly initiates, need not rebuild the running environment of browser, such that it is able to shorten the startup time of browser, promote the toggle speed of browser.
Fig. 4 is the flow chart of the device embodiment one that browser of the present invention cuts out, and as shown in Figure 4, the device of the present embodiment includes:
Close detector unit 11, be used for detecting browser out code;
Specifically, when user's click browser X button, trigger browser close event, send browser out code.
Close performance element 12, for when browser out code being detected, close the active tags page in browser window, and the running environment of reserved browser.
The device that the browser that the embodiment of the present invention provides cuts out, when browser out code being detected, the running environment of reserved browser, so that when browser starts next time, in the running environment of the browser can reserved when upper once browser cuts out, the interface of direct construction browser and function, and load the alternative document needed for browser starts.Compared with prior art, the present invention reserves the running environment of browser when browser cuts out so that follow-up browser need not rebuild the running environment of browser when starting, such that it is able to shorten the startup time of browser, promotes the toggle speed of browser.
Fig. 5 is the flow chart of the device embodiment two that browser of the present invention cuts out, as it is shown in figure 5, the device of the present embodiment is on the basis of Fig. 4 shown device structure, further, described closedown performance element 12 may include that
Shipping Options Page adds module 121, for adding blank tag page in described browser window;
Shipping Options Page arranges module 122, for described blank tag page is set to current active Shipping Options Page;
Shipping Options Page closes module 123, for closing in described browser window other active tags pages in addition to described current active Shipping Options Page;
Environment reserves module 124, for reserving the running environment of browser.
Further, as it is shown in figure 5, described device can also include:
Hidden unit 13, is used for hiding described browser window.
The device of the present embodiment, may be used for performing the technical scheme of said method embodiment of the present invention, and it is similar with technique effect that it realizes principle, and here is omitted.
Fig. 6 is the flow chart of the device embodiment one that browser of the present invention starts, and as shown in Figure 6, the device of the present embodiment includes:
Start detector unit 31, be used for detecting browser enabled instruction;
Specifically, when user double-clicks browser icon or selected browser icon and browser is opened in selection, trigger browser and start event, send browser enabled instruction.
Start performance element 32, for when browser enabled instruction being detected, in the running environment of the browser reserved when upper once browser cuts out, build interface and the function of browser, and load the alternative document needed for browser starts.
The device that the browser that the embodiment of the present invention provides starts, when browser enabled instruction being detected, in the running environment of the browser reserved when upper once browser cuts out, build interface and the function of browser, and load the alternative document needed for browser starts.Compared with prior art, the running environment of the browser that browser can be reserved when upper once browser cuts out directly initiates, need not rebuild the running environment of browser, such that it is able to shorten the startup time of browser, promote the toggle speed of browser.
Method that embodiment of the present invention browser is turned off and on, device, go for being actuated for Firefox browser accelerating, but be not limited only to this.
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment method, can be by computer program and complete to instruct relevant hardware, described program can be stored in a computer read/write memory medium, this program is upon execution, it may include such as the flow process of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc..
The above; being only the detailed description of the invention of the present invention, but protection scope of the present invention is not limited thereto, any those familiar with the art is in the technical scope that the invention discloses; the change that can readily occur in or replacement, all should contain within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with scope of the claims.

Claims (10)

1. the method that a browser cuts out, it is characterised in that including:
Detection browser out code;
When browser out code being detected, close the active tags page in browser window, and the running environment of reserved browser.
Method the most according to claim 1, it is characterised in that when described browser is Firefox, the active tags page in described closedown browser window includes: close the active tags page in browser window by Firefox expansion interface.
Method the most according to claim 2, it is characterised in that the active tags page in described closedown browser window includes:
Blank tag page is added in described browser window;
Described blank tag page is set to current active Shipping Options Page;
Close other active tags pages in addition to described current active Shipping Options Page in described browser window.
The most according to the method in any one of claims 1 to 3, it is characterised in that the active tags page in described closedown browser window, and after the running environment of reserved browser, described method also includes:
Hide described browser window.
Method the most according to claim 4, it is characterised in that when described browser is Firefox, described hiding described browser window includes: hide described browser window by Gtk+ interface.
6. the method that a browser starts, it is characterised in that including:
Detection browser enabled instruction;
When browser enabled instruction being detected, in the running environment of the browser reserved when upper once browser cuts out, build interface and the function of browser, and load the alternative document needed for browser starts.
7. the device that a browser cuts out, it is characterised in that including:
Close detector unit, be used for detecting browser out code;
Close performance element, for when browser out code being detected, close the active tags page in browser window, and the running environment of reserved browser.
Device the most according to claim 7, it is characterised in that described closedown performance element includes:
Shipping Options Page adds module, for adding blank tag page in described browser window;
Shipping Options Page arranges module, for described blank tag page is set to current active Shipping Options Page;
Shipping Options Page closes module, for closing in described browser window other active tags pages in addition to described current active Shipping Options Page;
Environment reserves module, for reserving the running environment of browser.
9. according to the device described in claim 7 or 8, it is characterised in that described device also includes:
Hidden unit, is used for hiding described browser window.
10. the device that a browser starts, it is characterised in that including:
Start detector unit, be used for detecting browser enabled instruction;
Start performance element, for when browser enabled instruction being detected, in the running environment of the browser reserved when upper once browser cuts out, build interface and the function of browser, and load the alternative document needed for browser starts.
CN201510135408.4A 2015-03-26 2015-03-26 The method, apparatus that browser is turned off and on Active CN106155710B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510135408.4A CN106155710B (en) 2015-03-26 2015-03-26 The method, apparatus that browser is turned off and on

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510135408.4A CN106155710B (en) 2015-03-26 2015-03-26 The method, apparatus that browser is turned off and on

Publications (2)

Publication Number Publication Date
CN106155710A true CN106155710A (en) 2016-11-23
CN106155710B CN106155710B (en) 2019-06-25

Family

ID=57339369

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510135408.4A Active CN106155710B (en) 2015-03-26 2015-03-26 The method, apparatus that browser is turned off and on

Country Status (1)

Country Link
CN (1) CN106155710B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108415735A (en) * 2018-02-01 2018-08-17 天津麒麟信息技术有限公司 A kind of Web browser quick start method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101273331A (en) * 2005-09-26 2008-09-24 皇家Kpn公司 Method of controlling a browser window
CN101561859A (en) * 2008-04-16 2009-10-21 杨奎 Method and system for online issue and use of software
WO2013032717A2 (en) * 2011-09-01 2013-03-07 Facebook, Inc. Domain-specific browser tab creation and management

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101273331A (en) * 2005-09-26 2008-09-24 皇家Kpn公司 Method of controlling a browser window
CN101561859A (en) * 2008-04-16 2009-10-21 杨奎 Method and system for online issue and use of software
WO2013032717A2 (en) * 2011-09-01 2013-03-07 Facebook, Inc. Domain-specific browser tab creation and management
US20130061160A1 (en) * 2011-09-01 2013-03-07 Erick Tseng Domain-Specific Browser Tab Creation and Management

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108415735A (en) * 2018-02-01 2018-08-17 天津麒麟信息技术有限公司 A kind of Web browser quick start method
CN108415735B (en) * 2018-02-01 2022-04-05 麒麟软件有限公司 Quick starting method of Web browser

Also Published As

Publication number Publication date
CN106155710B (en) 2019-06-25

Similar Documents

Publication Publication Date Title
US8650481B1 (en) Stable and secure use of content scripts in browser extensions
JP5830088B2 (en) Web application home button
US8386955B1 (en) User-optimized content for web browsing windows
US7921372B2 (en) System and method for pinning tabs in a tabbed browser
US9383903B2 (en) Systems and methods for providing programmable macros
US8856672B2 (en) Integrated user interface controls for web dialogs
US20130031462A1 (en) Web application architecture
US20130031455A1 (en) System for Linking to Documents with Associated Annotations
US20150207800A1 (en) Systems and methods for enabling access to a web application
US20120218212A1 (en) Computer device with touch screen and method for operating the same
JP2018517206A (en) Application page quick access
US20130031454A1 (en) System for Programmatically Accessing Document Annotations
US11334374B2 (en) Modifying readable and focusable elements on a page during execution of automated scripts
US10402470B2 (en) Effecting multi-step operations in an application in response to direct manipulation of a selected object
US20100287498A1 (en) User interface command disambiguation in a multi-window operating environment
US9798532B1 (en) Precompiling locally-stored instructions for a web application
US20190179653A1 (en) Automatically launched software add-ins for proactively analyzing content of documents and soliciting user input
US20150212670A1 (en) Highly Customizable New Tab Page
WO2017101351A1 (en) Terminal interaction operation method and device
CN105786455A (en) Method, device and terminal for data processing
US9524159B2 (en) Updating an operating system
US8677314B1 (en) Modifying a source code file to reduce dependencies included therein
US10282395B2 (en) Handling timer-based resizing events based on activity detection
US10372300B2 (en) Method, apparatus and mobile terminal for triggering widget in application
CN106155710A (en) Method that browser is turned off and on, device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100195 Building 2, Longxin Industrial Park, Zhongguancun environmental protection technology demonstration park, Haidian District, Beijing

Patentee after: Loongson Zhongke Technology Co.,Ltd.

Address before: 100195 Building 2, Longxin Industrial Park, Zhongguancun environmental protection technology demonstration park, Haidian District, Beijing

Patentee before: LOONGSON TECHNOLOGY Corp.,Ltd.