CN104462359B - The method and apparatus for reducing browser load - Google Patents
The method and apparatus for reducing browser load Download PDFInfo
- Publication number
- CN104462359B CN104462359B CN201410742962.4A CN201410742962A CN104462359B CN 104462359 B CN104462359 B CN 104462359B CN 201410742962 A CN201410742962 A CN 201410742962A CN 104462359 B CN104462359 B CN 104462359B
- Authority
- CN
- China
- Prior art keywords
- browser
- consumption
- performance
- web page
- master
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9574—Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The invention discloses a kind of method and apparatus for reducing browser load, first after master browser obtains the web page contents for needing to open and the web page contents are parsed, the element of the consumption browser performance in the web page element after parsing is obtained according to the element information of the consumption browser performance pre-set;Then the element of acquired consumption browser performance is organized into url;The content that above-mentioned url is shown with the sub- browser of element size identical of above-mentioned consumption browser performance is opened in opening position of the element on master browser of above-mentioned consumption browser performance;The element of above-mentioned consumption browser performance is hidden on master browser simultaneously.The present invention is out rendered the element sepatation of consumption browser performance by sub- browser, reduce the performance consumption of master browser, the rendering speed of master browser is improved, greatly improves the efficiency that display is rendered by single browser, quickly solves the more caused not smooth problems of single browser display content.
Description
Technical field
The present invention relates to browser technology field, more particularly to a kind of method and apparatus for reducing browser load.
Background technology
With the development of browser, present browser can support 2D (2Dimensions, two dimension), 3D
(3Dimensions, three-dimensional) application and GPU (Graphic Processing Unit, graphics processor) are hardware-accelerated.Although
Browser has employed hardware-accelerated ability when showing some elements, but in the case that browser page element is more,
For few web (internet) application program of some loads, browser loads naturally without any pressure for some
Show some flash (a kind of animation wounds of display in four or five HD video elements, or browser
Make software) animation effect.These elements influence the rendering speed of browser very much, while can influence rendering for full page so that
There is Caton phenomenon in browser.
The content of the invention
Based on the above situation, the present invention proposes a kind of method for reducing browser load, consumption browser performance
Element sepatation is out rendered by sub- browser, reduces the performance consumption of master browser, while improves the rendering speed of master browser,
The efficiency that display is rendered by single browser is greatly improved, reduces the load of single browser so that operationally more flow
Freely.
To achieve these goals, the embodiment of technical solution of the present invention is:
A kind of method for reducing browser load, comprises the following steps:
After master browser obtains and needs the web page contents opened and the web page contents are parsed, according to setting in advance
The element information for the consumption browser performance put obtains the element of the consumption browser performance in the web page element after the parsing;
The element of the consumption browser performance is organized into url (Uniform Resource Locator, unified resource
Finger URL);
Open in opening position of the element for consuming browser performance on the master browser and browsed with the consumption
The sub- browser of element size identical of device performance shows the content of the url;
The element of the consumption browser performance is hidden on the master browser.
For prior art problem, the invention also provides a kind of device for reducing browser load, a browser
The element sepatation for the consumption browser performance to be shown shows quickly solve single browser display content and lead more to sub- browser
The not smooth problem caused, it is simple in construction, cost is low, meet practical application.
The embodiment of technical solution of the present invention is:
A kind of device for reducing browser load, including:
Acquisition module, for obtaining the web page contents for needing to open in master browser and being parsed to the web page contents
Afterwards, the consumption obtained according to the element information of the consumption browser performance pre-set in the web page element after the parsing browses
The element of device performance;
Molded tissue block, for the element of the consumption browser performance to be organized into url;
Opening module, for opening position of the element on the master browser of the consumption browser performance open with
The sub- browser of element size identical of the consumption browser performance shows the content of the url;
Hidden module, for hiding the element of the consumption browser performance on the master browser.
Compared with prior art, beneficial effects of the present invention are:The method and apparatus that the present invention reduces browser load,
The element sepatation of consumption browser performance is out rendered by sub- browser, reduces the performance consumption of master browser, while improve master
The rendering speed of browser, the efficiency that display is rendered by single browser is greatly improved, reduces the load of single browser,
Quickly solve the more caused not smooth problems of single browser display content.
Brief description of the drawings
Fig. 1 is the method flow diagram that browser load is reduced in one embodiment;
Fig. 2 is the method flow diagram that single browser shows the page in one embodiment;
Fig. 3 is based on the method flow diagram that browser load is reduced in method one shown in Fig. 1 specific example;
Fig. 4 is the design sketch that single browser shows the page in one embodiment;
Fig. 5 is that the application present invention reduces the effect that the method that browser loads isolates the flash plug-in units in Fig. 4 master browsers
Fruit is schemed;
Fig. 6 is that the application present invention reduces the method for browser load and shows master browser that Fig. 5 isolates by sub- browser
In flash plug-in units design sketch;
Fig. 7 is the apparatus structure schematic diagram that browser load is reduced in one embodiment.
Embodiment
For the objects, technical solutions and advantages of the present invention are more clearly understood, below in conjunction with drawings and Examples, to this
Invention is described in further detail.It should be appreciated that embodiment described herein is only to explain the present invention,
Do not limit protection scope of the present invention.
The method that browser load is reduced in one embodiment, as shown in figure 1, comprising the following steps:
Step S101:After master browser obtains the web page contents for needing to open and the web page contents are parsed,
The consumption browser in the web page element after the parsing is obtained according to the element information of the consumption browser performance pre-set
The element of performance;
Step S102:The element of the consumption browser performance is organized into url;
Step S103:Opening position of the element on the master browser of the consumption browser performance open with it is described
The sub- browser of element size identical of consumption browser performance shows the content of the url;
Step S104:The element of the consumption browser performance is hidden on the master browser.
When there is the element of multiple consumption browser performances in master browser, respectively by the member of multiple consumption browser performances
Element is organized into url, and consuming opening position of the element of browser performance on above-mentioned master browser at each opens one with being somebody's turn to do
The sub- browser of element size identical of consumption browser performance shows above-mentioned url content, and a url is by a sub- browser
Shown.
It is evidenced from the above discussion that the method that the present invention reduces browser load, the element sepatation of consumption browser performance
Out rendered by sub- browser, reduce the performance consumption of master browser, while improve the rendering speed of master browser, be adapted to actual
Using.
As one embodiment, the element information for the consumption browser performance that the basis is pre-set obtains the parsing
The step of element of consumption browser performance in web page element afterwards, includes:
The web page element after parsing includes video tab or flash plug-in units, and the video tab or flash
The width and/or height of plug-in unit are more than the width threshold value and/or height threshold of the video tab pre-set or flash plug-in units
When, video tab in web page element or flash plug-in units after the parsing for consumption browser performance element;
Such as element of the video tab for consumption browser performance is defined, and set the width threshold value of the video tab to be
800 or height threshold be 600, web page element after being parsed to web page contents includes video tab, and the video tab
When width is more than 800 or is highly more than 600, the video tab in the web page element after parsing is the member of consumption browser performance
Element;
Various definitions rule can be added in the element information of consumption browser performance according to actual conditions herein,
The element that consumption browser performance is isolated in single browser is rendered by sub- browser, reduces the load of single browser.
As one embodiment, the element information for the consumption browser performance that the basis is pre-set obtains the parsing
The step of element of consumption browser performance in web page element afterwards, includes:
The web page element after parsing includes video tab or flash plug-in unit elements, and the video tab or
When the element property of flash plug-in units includes split=1, the video tab or flash plug-in units in web page element after the parsing
To consume the element of browser performance;
Such as element of the flash plug-in units for consumption browser performance is defined, and to the flash plug-in unit addition element attributes
Split=1, web page element after being parsed to web page contents include flash plug-in units, and the element property of the flash plug-in units
During including split=1, the flash plug-in units in the web page element after parsing are the element of consumption browser performance;
Various definitions attribute can be added in the element information of consumption browser performance according to actual conditions herein,
The element sepatation of consumption browser performance is out rendered by sub- browser, reduces the performance consumption of master browser.
As one embodiment, position of the element on the master browser of the consumption browser performance, size and
Content obtains according to the web page element after the parsing, opens the sub- browser for specifying size in specified location according to above- mentioned information
The url contents being organized into the element for consuming browser performance show that application value is high.
As one embodiment, it is Rimless browser that the master, which is browsed with sub- browser, looks whole system
Shown by a browser, facilitate user to check, be adapted to application.
In order to more fully understand this method, a present invention detailed below reduces the method application of browser load in fact
Example.
Single browser shows the method for the page as shown in Fig. 2 including step in one embodiment:
Step S201:Open browser;
Step S202:From network or local obtains the web page contents that browser needs to open;
Step S203:Browser HTML (Hyper Text Markup language, HyperText Markup Language) is parsed
CSS resolvers, DOM parser and Javascript engines in device parse the web page contents of acquisition respectively;
Step S204:The content of browser internal representation is produced after being parsed;
Step S205:Web page element is laid out and color applying drawing;
Step S206:Show web page contents.
As shown in figure 3, the application example that the present invention reduces the method for browser load may comprise steps of:
Step S301:Element of the flash plug-in units for consumption browser performance is defined, and to the flash plug-in unit addition element
Attribute split=1;
Step S302:Starting master browser, obtain the web page contents for needing to open and DOM solutions are carried out to the web page contents
After analysis, the element information of the above-mentioned consumption browser performance pre-set is read, web page element after parsing includes flash
Plug-in unit, the and when element property of the flash plug-in units includes split=1, the flash plug-in units for consumption browser performance element;
Step S303:Above-mentioned acquired flash plug-in units are organized into url;
Step S304:Opened and above-mentioned consumption in opening position of the element on master browser of above-mentioned consumption browser performance
The sub- browser of element size identical of browser performance shows above-mentioned url content;The element of above-mentioned consumption browser performance
Position, size and content on master browser obtain according to the web page element after above-mentioned parsing;
Step S305:The element of above-mentioned consumption browser performance is hidden on master browser, master browser is not to the consumption
The element of browser performance is shown;
Such as the web page element carried out to web page contents after DOM parsings includes flash plug-in units<Embed style="
position:absolute;z-index:3;left:300px;top:100px;" width=" 1000 " height=" 1000 "
Name=" plugin " src=" test.swf " type=" application/x-shockwave-flash " split=" 1 "/
>, the element property of the flash plug-in units includes split=1, and the flash plug-in units are the element of consumption browser performance, will be above-mentioned
Acquired flash plug-in units are organized into url, and in the master browser upper left corner, relative position x is that the place that 300, y is 100 opens one
Individual wide by 1000, high 1000 sub- browser display content is data:text/html;Charset=utf-8,<embed style
=' left:0px;top:0px'width='1000'height='1000'name='plugin'src='test.swf'
Type='application/x-shockwave-flash'>A url, while hide the flash in master browser and insert
Part, the flash plug-in units are not shown;
When parsing the element of multiple consumption browser performances, the element of multiple consumption browser performances is distinguished respectively
Be organized into multiple url, opening position of the element on above-mentioned master browser of each consumption browser performance open one with
The sub- browser of element size identical of the consumption browser performance shows the url that the element of the consumption browser performance is organized into
Content, a url are shown that the higher element of some loads in such master browser is all by difference by a sub- browser
Sub- browser in go to render display, reduce the load of master browser, make other operations of master browser become smooth, master is clear
It is Rimless browser to look at sub- browser, looks whole system and is shown by a browser, facilitates user to check.
This application example is out rendered the element sepatation of consumption browser performance by sub- browser, reduces master browser
Performance consumption, while the rendering speed of master browser is improved, the efficiency that display is rendered by single browser is greatly improved, is reduced
The load of single browser, quickly solve single browser display content it is more caused by not smooth problems.
Fig. 4 is the design sketch that single browser shows the page in one embodiment, and some flash are shown in single browser
Plug-in unit, flash plug-in units consume browser performance, influence the rendering speed of browser so that the phenomenon of interim card occurs in browser.Figure
5 be the method for reducing browser load to Fig. 4 application present invention, the element flash of browser performance will be consumed in master browser
Plug-in unit is separated.Fig. 6 is browsed the element flash plug-in units of Fig. 5 consumption browser performances isolated from master browser by son
Device renders display, i.e., open one in the position of master browser original flash plug-in units browses with former flash plug-in units size identical
Device shows the flash plug-in contents, hides flash plug-in units on master browser, no longer shows the flash plug-in units, can from figure
Go out has a master browser in orlop, and upper strata opens a sub- browser and shows the flash plug-in units, and main browse browses with son
Device is Rimless browser, looks whole system and is shown by a browser, facilitates user to check, consumption master is browsed
The element sepatation of device performance is out rendered by sub- browser, reduces the performance consumption of master browser, while improve master browser
Rendering speed, the efficiency that display is rendered by single browser is greatly improved, reduce the load of single browser, it is quick to solve
Not smooth problem caused by single browser display content is more.
The device of browser load is reduced in one embodiment, as shown in fig. 7, comprises:
Acquisition module 702, for obtaining the web page contents for needing to open in master browser 701 and entering to the web page contents
After row parsing, disappearing in the web page element after the parsing is obtained according to the element information of the consumption browser performance pre-set
Consume the element of browser performance;
Molded tissue block 703, for the element of the consumption browser performance to be organized into url;
Opening module 704, for the opening position in the element for consuming browser performance on the master browser 701
Open the content that the url is shown with the sub- browser 705 of element size identical of the consumption browser performance;
Hidden module 706, for hiding the element of the consumption browser performance on the master browser 701.
As shown in fig. 7, acquisition module 702 first obtains in master browser 701 and needs the web page contents opened and to described
After web page contents are parsed, the webpage after the parsing is obtained according to the element information of the consumption browser performance pre-set
The element of consumption browser performance in element;Then molded tissue block 703 is by the element group of acquired consumption browser performance
It is made into url;Opening module 704 opening position of the element on master browser 701 of above-mentioned consumption browser performance open with it is upper
The sub- browser 705 of element size identical for stating consumption browser performance shows above-mentioned url content;Hidden module 706 simultaneously
The element of above-mentioned consumption browser performance is hidden on master browser 701, the element of the consumption browser performance is not shown
Show.
It is evidenced from the above discussion that the present invention reduces the device of browser load, the browser consumption to be shown is clear
The element sepatation of device performance look at shows to sub- browser, quickly solves not smooth to ask caused by single browser display content is more
Topic, it is simple in construction, cost is low, meet practical application.
As one embodiment, the acquisition module 702 includes:
Acquiring unit one, include video tab or flash plug-in units for the web page element after parsing, and it is described
The width and/or height of video tab or flash plug-in units are more than the width threshold value of the video tab pre-set or flash plug-in units
And/or during height threshold, video tab in web page element or flash plug-in units after the parsing are consumption browser performance
Element;
Such as element of the video tab for consumption browser performance is defined, and set the width threshold value of the video tab to be
800 or height threshold be 600, web page element after parsing includes video tab, and the width of the video tab is more than 800
Or height be more than 600 when, acquiring unit one parse after web page element in the video tab for consume browser performance
Element;
Various definitions rule can be added in the element information of consumption browser performance according to actual conditions herein,
The element that consumption browser performance is isolated in single browser is rendered by sub- browser, reduces the load of single browser.
As one embodiment, the acquisition module 702 includes:
Acquiring unit two, include video tab or flash plug-in unit elements for the web page element after parsing, and
When the element property of video tab or the flash plug-in unit includes split=1, the video in web page element after the parsing
Label or the element that flash plug-in units are consumption browser performance;
Such as element of the flash plug-in units for consumption browser performance is defined, and to the flash plug-in unit addition element attributes
Split=1, web page element after parsing includes flash plug-in units, and the element property of the flash plug-in units includes split=
1, acquiring unit two parsed after web page element in the flash plug-in units for consumption browser performance element;
Various definitions attribute can be added in the element information of consumption browser performance according to actual conditions herein,
The element sepatation of consumption browser performance is out rendered by sub- browser, reduces the performance consumption of master browser.
As one embodiment, position of the element on the master browser of the consumption browser performance, size and
Content obtains according to the web page element after the parsing, opens the sub- browser for specifying size in specified location according to above- mentioned information
The url contents being organized into the element for consuming browser performance show that application value is high.
As one embodiment, it is Rimless browser that the master, which is browsed with sub- browser, looks whole system
Shown by a browser, facilitate user to check, be adapted to application.
Embodiment described above only expresses the several embodiments of the present invention, and its description is more specific and detailed, but simultaneously
Therefore the limitation to the scope of the claims of the present invention can not be interpreted as.It should be pointed out that for one of ordinary skill in the art
For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the guarantor of the present invention
Protect scope.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.
Claims (8)
- A kind of 1. method for reducing browser load, it is characterised in that comprise the following steps:After master browser obtains the web page contents for needing to open and the web page contents are parsed, according to what is pre-set The element information for consuming browser performance obtains the element of the consumption browser performance in the web page element after the parsing;Its In, the consumption obtained according to the element information of the consumption browser performance pre-set in the web page element after the parsing browses The step of element of device performance, includes:The web page element after parsing includes video tab or flash plug-in units, and described The width and/or height of video tab or flash plug-in units are more than the width threshold value of the video tab pre-set or flash plug-in units And/or during height threshold, video tab in web page element or flash plug-in units after the parsing are consumption browser performance Element;The element of the consumption browser performance is organized into url;Opened and the consumption browser in opening position of the element for consuming browser performance on the master browser The sub- browser of element size identical of energy shows the content of the url;The element of the consumption browser performance is hidden on the master browser.
- 2. the method according to claim 1 for reducing browser load, it is characterised in that what the basis was pre-set disappears The step of element of the consumption browser performance consumed in the web page element after the element information acquisition parsing of browser performance Including:The web page element after parsing includes video tab or flash plug-in unit elements, and the video tab or flash When the element property of plug-in unit includes split=1, video tab in web page element or flash plug-in units after the parsing is disappear Consume the element of browser performance.
- 3. the method according to claim 1 or 2 for reducing browser load, it is characterised in that the consumption browser Position, size and content of the element of energy on the master browser obtain according to the web page element after the parsing.
- 4. the method according to claim 3 for reducing browser load, it is characterised in that the master browses and sub- browser It is Rimless browser.
- A kind of 5. device for reducing browser load, it is characterised in that including:Acquisition module, after parsing for the web page contents opened in master browser acquisition needs and to the web page contents, The consumption browser in the web page element after the parsing is obtained according to the element information of the consumption browser performance pre-set The element of performance;Wherein, the acquisition module includes:Acquiring unit one, include for the web page element after parsing Video tab or flash plug-in units, and the width and/or height of the video tab or flash plug-in units regard more than what is pre-set When the width threshold value and/or height threshold of frequency marking label or flash plug-in units, video tab in web page element after the parsing or Flash plug-in units are the element of consumption browser performance;Molded tissue block, for the element of the consumption browser performance to be organized into url;Opening module, for opening position of the element on the master browser of the consumption browser performance open with it is described The sub- browser of element size identical of consumption browser performance shows the content of the url;Hidden module, in the master The element of the consumption browser performance is hidden on browser.
- 6. the device according to claim 5 for reducing browser load, it is characterised in that the acquisition module includes:Acquiring unit two, include video tab or flash plug-in unit elements for the web page element after parsing, and it is described When the element property of video tab or flash plug-in units includes split=1, the video tab in web page element after the parsing Or flash plug-in units are the element of consumption browser performance.
- 7. the device for reducing browser load according to claim 5 or 6, it is characterised in that the consumption browser Position, size and content of the element of energy on the master browser obtain according to the web page element after the parsing.
- 8. the device according to claim 7 for reducing browser load, it is characterised in that the master browses and sub- browser It is Rimless browser.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410742962.4A CN104462359B (en) | 2014-12-05 | 2014-12-05 | The method and apparatus for reducing browser load |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410742962.4A CN104462359B (en) | 2014-12-05 | 2014-12-05 | The method and apparatus for reducing browser load |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104462359A CN104462359A (en) | 2015-03-25 |
CN104462359B true CN104462359B (en) | 2018-03-06 |
Family
ID=52908394
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410742962.4A Active CN104462359B (en) | 2014-12-05 | 2014-12-05 | The method and apparatus for reducing browser load |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104462359B (en) |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2003040955A1 (en) * | 2001-11-06 | 2003-05-15 | Farooq Khan | Method and apparatus for capturing and displaying web page information |
CN101504648A (en) * | 2008-11-14 | 2009-08-12 | 北京搜狗科技发展有限公司 | Method and apparatus for showing web page resources |
-
2014
- 2014-12-05 CN CN201410742962.4A patent/CN104462359B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN104462359A (en) | 2015-03-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11580175B2 (en) | Transcoding and serving resources | |
US20130145255A1 (en) | Systems and methods for filtering web page contents | |
WO2018161709A1 (en) | Method and device for rendering overlay comment | |
CN105094786B (en) | Method and system based on JavaScript customized web page | |
CN102253979B (en) | Vision-based web page extracting method | |
CN102479181B (en) | Based on Web page text extracting method and the device of DIV position | |
WO2015090064A1 (en) | Page rendering method and apparatus | |
Jiang et al. | Responsive web design mode and application | |
KR20140012664A (en) | Method for rearranging web page | |
CN105677654B (en) | Advertisement filtering method and device | |
CN102915375A (en) | Webpage loading method based on layout zoning | |
CN104217036B (en) | A kind of webpage content extracting method and equipment | |
CN105205080B (en) | Redundant file method for cleaning, device and system | |
WO2015196822A1 (en) | Method and device for adapting webpage to screen layout | |
CN103577466A (en) | Method and device for displaying webpage content in browser | |
WO2014153457A1 (en) | Merging web page style addresses | |
CN105094930A (en) | Image positioning system and method | |
US20150370439A1 (en) | Gpu-optimized scrolling systems and methods | |
CN102207974B (en) | Method for combining context web pages | |
CN109683978A (en) | A kind of method, apparatus and electronic equipment of the rendering of streaming layout interface | |
JP2009508253A5 (en) | ||
CN104166545B (en) | The sniff method and device of a kind of web page resources | |
CN114791988A (en) | Browser-based PDF file analysis method, system and storage medium | |
CN106575303B (en) | Method and device for displaying webpage | |
CN104462359B (en) | The method and apparatus for reducing browser load |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |