CN104123365B - Web page resources method for down loading and system - Google Patents

Web page resources method for down loading and system Download PDF

Info

Publication number
CN104123365B
CN104123365B CN201410352610.8A CN201410352610A CN104123365B CN 104123365 B CN104123365 B CN 104123365B CN 201410352610 A CN201410352610 A CN 201410352610A CN 104123365 B CN104123365 B CN 104123365B
Authority
CN
China
Prior art keywords
resource
download
quotes
webpage
download address
Prior art date
Application number
CN201410352610.8A
Other languages
Chinese (zh)
Other versions
CN104123365A (en
Inventor
宋章章
关翔
Original Assignee
可牛网络技术(北京)有限公司
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 可牛网络技术(北京)有限公司 filed Critical 可牛网络技术(北京)有限公司
Priority to CN201410352610.8A priority Critical patent/CN104123365B/en
Publication of CN104123365A publication Critical patent/CN104123365A/en
Application granted granted Critical
Publication of CN104123365B publication Critical patent/CN104123365B/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network-specific arrangements or communication protocols supporting networked applications
    • H04L67/06Network-specific arrangements or communication protocols supporting networked applications adapted for file transfer, e.g. file transfer protocol [FTP]

Abstract

An embodiment of the present invention provides a kind of web page resources method for down loading and systems, the download address that resource can be quoted to first in webpage parses, when the download address of the first reference resource is successfully parsed, the download address of the second reference resource in webpage is parsed, and the download link of the download address of the first reference resource is acquired, it downloads first according to the download link obtained and quotes resource.The present invention can be downloaded the reference resource for successfully parsing to obtain download address in resolving.The present invention realizes the effect downloaded in parsing, without being downloaded again to quoting resource after the download address of all references resource is successfully parsed.The present invention, which improves, quotes resource downloading efficiency so that quoting resource can be presented in webpage faster.

Description

Web page resources method for down loading and system

Technical field

The present invention relates to web technologies field, more particularly to web page resources method for down loading and system.

Background technology

With the development of science and technology, internet has become the indispensable part of people's life.User can pass through electricity Sub- equipment surfs the web the various contents in webpage, obtains abundant information.

In order to make the content in webpage more abundant, there are vast resources, such as picture, plug-in unit in webpage.It is beaten in browser During opening webpage, it is necessary first to the download address that resource is all quoted in webpage be parsed, drawn having parsed whole It is downloaded after the download address of resource, then to quoting resource.

Since existing reference resource downloading mode is needed after the download address for all quoting resource has been parsed just to money Source is downloaded, therefore causes resource to be referred to presentation on webpage slower.

The content of the invention

The embodiment of the present invention is designed to provide a kind of web page resources method for down loading and system, and money is quoted to realize to improve Source download efficiency is accelerated to quote the purpose of resource presentation speed.

In order to achieve the above objectives, the embodiment of the invention discloses a kind of web page resources method for down loading, including:

The download address of the first reference resource in webpage is parsed;

If the download address of the first reference resource is successfully parsed, second in webpage is quoted under resource Set address is parsed, and acquires the download link of the described first download address for quoting resource, according to the download obtained Link downloads described first and quotes resource.

Optionally, the download link for acquiring the described first download address for quoting resource, according to being obtained down It carries link and downloads the first reference resource, including:

Judge whether available links, the available links in the preset time period before current time by using To described first quote resource download address download link;

If it is present downloading described first according to the available links quotes resource;

Otherwise, the download link for the download address for quoting resource to described first is established, according to the download link established It downloads described first and quotes resource, preserve the download link for the download address for quoting resource to described first established.

Optionally, further include:The download link that the free time of preservation is more than to preset time threshold is deleted.

Optionally, the described first priority for quoting resource quotes the priority of resource higher than described second.

Optionally, further include:After described first quotes resource downloading, show that described first quotes money in webpage Source.

A kind of web page resources download system, including:Resource resolution unit, parsing determination unit and resource downloading unit,

The resource resolution unit parses for the download address to the first reference resource in webpage, by institute When stating parsing determination unit triggering, parsed for the download address to the second reference resource in webpage;

Whether the parsing determination unit, the download address for determining the first reference resource are successfully parsed, such as Fruit is then to trigger the resource downloading unit, and triggers the resource resolution unit and quote resource to described second in webpage Download address parsed;

The resource downloading unit, for acquiring the download link of the described first download address for quoting resource, according to The download link obtained downloads described first and quotes resource.

Optionally, the resource downloading unit, including:Available links judgment sub-unit, first time subelements and second Lower subelements,

The available links judgment sub-unit, for judging whether available links, when the available links are current The download link of the used download address to the described first reference resource of institute in preset time period before quarter, if deposited , then first time subelements are triggered, otherwise trigger second time subelements,

First time subelements quote resource for downloading described first according to the available links;

Second time subelements, for establishing the download link for the download address for quoting resource to described first, root Described first is downloaded according to the download link established and quotes resource, and what preservation was established with arriving the described first download for quoting resource The download link of location.

Optionally, further include:Unit is deleted in link, and the free time for that will preserve is more than the download of preset time threshold Link is deleted.

Optionally, the described first priority for quoting resource quotes the priority of resource higher than described second.

Optionally, further include:Resource display unit, for finishing the first reference resource in resource downloading unit download Afterwards, show that described first quotes resource in webpage.

A kind of web page resources method for down loading provided in an embodiment of the present invention and system, can be in resolving, to success The reference resource that parsing obtains download address is downloaded.The present invention realizes the effect downloaded in parsing, without all The download address of reference resource is downloaded after being successfully parsed to quoting resource again.The present invention, which improves, quotes resource downloading effect Rate so that quoting resource can be presented in webpage faster.

Description of the drawings

It in order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention, for those of ordinary skill in the art, without creative efforts, can be with Other attached drawings are obtained according to these attached drawings.

Fig. 1 is a kind of flow chart of web page resources method for down loading provided in an embodiment of the present invention;

Fig. 2 is the flow chart of another web page resources method for down loading provided in an embodiment of the present invention;

Fig. 3 is the flow chart of another web page resources method for down loading provided in an embodiment of the present invention;

Fig. 4 is a kind of structure diagram of web page resources download system provided in an embodiment of the present invention;

Fig. 5 is the structure diagram of another web page resources download system provided in an embodiment of the present invention;

Fig. 6 is the structure diagram of another web page resources download system provided in an embodiment of the present invention.

Specific embodiment

Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other without making creative work Embodiment belongs to the scope of protection of the invention.

As shown in Figure 1, an embodiment of the present invention provides a kind of web page resources method for down loading, can include:

S100, the download address of the first reference resource in webpage is parsed;

Specifically, the download address that resource is quoted in webpage can be parsed from web page source code and obtained.

Wherein, the reference resource in webpage can include:Any one in picture, script, style sheet, webpage, plug-in unit It is or a variety of.Wherein, script --- such as JavaScript, VBScript --- can have multiple functions in webpage, such as carry out Curve guide impeller, verification list, detection browser, establishment cookies etc..Style sheet (Cascading Style Sheets, CSS) It is that one kind is used for showing hypertext markup language (Hyper Text Markup Language, HTML) or extending mark language The computer language of files patterns such as (EXtensible Markup Language, XML) can control the lattice of object in webpage Font size, the color of word in the attributes such as formula, position, such as control webpage.Plug-in unit can add video, sound in webpage Frequently or the web objects such as Flash, web page contents can be caused to become more to enrich.

If S200, the download address of the first reference resource are successfully parsed, S300 and S400 is performed;

S300, the download address of the second reference resource in webpage is parsed;

S400, the download link for obtaining the first download address for quoting resource download the according to the download link that is obtained One quotes resource.

In an embodiment of the present invention, the execution sequence of above-mentioned S300 and S400 is not construed as limiting, once there is download address It is successfully parsed, it is possible to it establishes download link and then downloads and quote resource, while with parsing the download of next reference resource Location, it is not necessary to download reference resource again when all download address all parse to finish.

For convenience of understanding, it is exemplified below:

Assuming that in webpage quote resource there are three, be respectively a pictures, a script and a plug-in unit, can be right first Any one in these three reference resources is parsed.Such as, picture is parsed first, is obtaining the download address of picture Afterwards, the download link to the download address of the picture is established, and downloads the picture.Meanwhile under other two reference resource The parsing that set address carries out also continues with.After successfully parsing obtains the download address of any reference resource, establish this and draw With the download link of the download address of resource, and download the reference resource.

Optionally, in one kind of the invention in the specific implementation, the above-mentioned first priority for quoting resource is higher than above-mentioned second The priority of resource is quoted, i.e.,:In an embodiment of the present invention, can be provided according to the order of priority from high to low to quoting The download address in source is parsed.

Optionally, it can also be grouped to quoting resource, to different groups, be downloaded parsing and the money of address respectively It downloads in source.Such as:Different type reference resource is grouped, is obtained:Script group, picture group, style sheet group, plug-in unit group, net Page group etc..Different priority for different groups of reference resources is set, the priority of script group is such as arranged to highest, this Sample preferentially the group high to priority can be downloaded address resolution and resource downloading.

Optionally, as shown in Fig. 2, in other embodiments of the present invention, after above-mentioned S400, can also include:

S500, first quote resource downloading after, in webpage show first quote resource.

Such as:After picture is downloaded, then picture can be presented in webpage.At this point, other reference resources may There are no downloads to finish.In this way, user can browse the picture in webpage first, reduce the stand-by period of user.

A kind of web page resources method for down loading provided in an embodiment of the present invention, can be in resolving, to successfully parsing Reference resource to download address is downloaded.The present invention realizes the effect downloaded in parsing, without being provided in all references The download address in source is downloaded after being successfully parsed to quoting resource again.The present invention, which improves, quotes resource downloading efficiency, makes Resource, which must be quoted, to be presented faster in webpage.

Optionally, as shown in figure 3, in another kind web page resources method for down loading provided in an embodiment of the present invention, above-mentioned S400 It can include:

S410, available links are judged whether, the available links are institute in the preset time period before current time The download link of the used download address that resource is quoted to described first if it is present performing S420, otherwise, performs S430;

S420, the first reference resource is downloaded according to the available links;

S430, the download link for establishing the download address for quoting resource to first, are downloaded according to the download link established First quotes resource;

S440, the download link that established first quotes the download address of resource is preserved.

Specifically, after S440 is preserved the download link of the download address of the established first reference resource, built The download link of the download address of the first vertical reference resource can serve as available links and continue to use.

The used download link of institute is preserved, subsequently downloads identical resource if necessary, it just need not again again It establishes, simplifies the downloading process for quoting resource.

When the download link of preservation is more, more memory space will be occupied, thus can by the resting period relatively long and The download link do not used deletes.For example, the download link that free time is more than to preset time threshold is deleted.

Corresponding with above method embodiment, the present invention also provides a kind of web page resources download systems.

As shown in figure 4, a kind of web page resources download system provided in an embodiment of the present invention, can include:Resource resolution list Member 100, parsing determination unit 200 and resource downloading unit 300,

The resource resolution unit 100 parses for the download address to the first reference resource in webpage, in quilt When the parsing determination unit 200 triggers, parsed for the download address to the second reference resource in webpage;

Specifically, the download address that resource is quoted in webpage can be parsed from web page source code and obtained.Wherein, in webpage Reference resource can include:Any one or more in picture, script, style sheet, webpage, plug-in unit.

Whether the parsing determination unit 200, the download address for determining the first reference resource are successfully parsed, If it is, triggering the resource downloading unit 300, and the resource resolution unit 100 is triggered to described second in webpage The download address for quoting resource is parsed;

The resource downloading unit 300, for obtaining the download link of the described first download address for quoting resource, according to The download link obtained downloads described first and quotes resource.

Optionally, in one kind of the invention in the specific implementation, above-mentioned reference resource has priority, first quotes resource Priority quotes the priority of resource higher than second.I.e.:In an embodiment of the present invention, resource resolution unit 100 can be according to The order of priority from high to low parses the download address for quoting resource.

Optionally, as shown in figure 5, in other embodiments of the present invention, can also include:

Resource display unit 400, for the resource downloading unit 300 download finish the first reference resource after, in net Show that described first quotes resource in page.

A kind of web page resources download system provided in an embodiment of the present invention, can be in resolving, to successfully parsing Reference resource to download address is downloaded.The present invention realizes the effect downloaded in parsing, without being provided in all references The download address in source is downloaded after being successfully parsed to quoting resource again.The present invention, which improves, quotes resource downloading efficiency, makes Resource, which must be quoted, to be presented faster in webpage.

Optionally, as shown in fig. 6, in another kind web page resources download system provided in an embodiment of the present invention, resource downloading Unit 300 can include:Available links judgment sub-unit 310, first time subelements 320 and second time subelements 330,

The available links judgment sub-unit 310, for judging whether available links, the available links are current The download link of the used download address to the described first reference resource of institute in preset time period before moment, if deposited , then first time subelements 320 are triggered, otherwise trigger second time subelements 330,

First time subelements 320 quote resource for downloading described first according to the available links;

Second time subelements 330, for establishing the download link for the download address for quoting resource to described first, Described first is downloaded according to the download link established and quotes resource, preserves the download for quoting resource to described first established The download link of address.

Optionally, the used download link of institute can also be preserved, subsequently downloads identical resource if necessary, Just without re-establishing again, the downloading process for quoting resource is simplified.

When the download link of preservation is more, more memory space will be occupied, thus can by the resting period relatively long and The download link do not used deletes.Optionally, in other embodiments of the present invention, can also include:Unit is deleted in link, is used It is deleted in the download link that free time is more than to preset time threshold.

It should be noted that herein, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant are intended to Non-exclusive inclusion, so that process, method, article or equipment including a series of elements not only will including those Element, but also including other elements that are not explicitly listed or further include as this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that Also there are other identical elements in process, method, article or equipment including the element.

Each embodiment in this specification is described using relevant mode, identical similar portion between each embodiment Point just to refer each other, and the highlights of each of the examples are difference from other examples.It is real especially for system For applying example, since it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method Part explanation.

The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modifications, equivalent replacements and improvements are made within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (10)

1. a kind of web page resources method for down loading, which is characterized in that including:
The download address of the first reference resource in webpage is parsed;
If the download address of the first reference resource is successfully parsed, the download of resource is quoted to second in webpage Location is parsed, and acquires the download link of the described first download address for quoting resource, according to the download link obtained It downloads described first and quotes resource;
Reference resource in webpage includes script.
2. according to the method described in claim 1, it is characterized in that, described acquire the described first download address for quoting resource Download link, download described first according to the download link that is obtained and quote resource, including:
Judge whether available links, the available links are used in the preset time period before current time to be arrived Described first quotes the download link of the download address of resource;
If it is present downloading described first according to the available links quotes resource;
Otherwise, the download link for the download address for quoting resource to described first is established, is downloaded according to the download link established Described first quotes resource, preserves the download link for the download address for quoting resource to described first established.
3. it according to the method described in claim 2, it is characterized in that, further includes:The free time of preservation is more than preset time The download link of threshold value is deleted.
4. according to the method in any one of claims 1 to 3, which is characterized in that described first quotes the priority of resource The priority of resource is quoted higher than described second.
5. it according to the method described in claim 1, it is characterized in that, further includes:After described first quotes resource downloading, Show that described first quotes resource in webpage.
6. a kind of web page resources download system, which is characterized in that including:Under resource resolution unit, parsing determination unit and resource Carrier unit,
The resource resolution unit parses for the download address to the first reference resource in webpage, by the solution When analysing determination unit triggering, parsed for the download address to the second reference resource in webpage;
Whether the parsing determination unit, the download address for determining the first reference resource are successfully parsed, if so, The resource downloading unit is then triggered, and triggers the download that the resource resolution unit quotes described second in webpage resource Address is parsed;
The resource downloading unit, for acquiring the download link of the described first download address for quoting resource, according to being obtained The download link obtained downloads described first and quotes resource;
Reference resource in webpage includes script.
7. system according to claim 6, which is characterized in that the resource downloading unit, including:Available links judge son Unit, first time subelements and second time subelements,
The available links judgment sub-unit, for judging whether available links, the available links for current time it The download link of the used download address to the described first reference resource of institute in preceding preset time period, if it is present First time subelements are triggered, otherwise trigger second time subelements,
First time subelements quote resource for downloading described first according to the available links;
Second time subelements, for establishing the download link for the download address for quoting resource to described first, according to institute The download link of foundation downloads described first and quotes resource, the download address for quoting resource to described first that preservation is established Download link.
8. system according to claim 7, which is characterized in that further include:Unit is deleted in link, for the free time that will be preserved The download link that time is more than preset time threshold is deleted.
9. the system according to any one of claim 6 to 8, which is characterized in that described first quotes the priority of resource The priority of resource is quoted higher than described second.
10. system according to claim 6, which is characterized in that further include:Resource display unit, in the resource After download unit download finishes the first reference resource, show that described first quotes resource in webpage.
CN201410352610.8A 2014-07-23 2014-07-23 Web page resources method for down loading and system CN104123365B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410352610.8A CN104123365B (en) 2014-07-23 2014-07-23 Web page resources method for down loading and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410352610.8A CN104123365B (en) 2014-07-23 2014-07-23 Web page resources method for down loading and system

Publications (2)

Publication Number Publication Date
CN104123365A CN104123365A (en) 2014-10-29
CN104123365B true CN104123365B (en) 2018-06-05

Family

ID=51768776

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410352610.8A CN104123365B (en) 2014-07-23 2014-07-23 Web page resources method for down loading and system

Country Status (1)

Country Link
CN (1) CN104123365B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106060124A (en) * 2016-05-21 2016-10-26 乐视控股(北京)有限公司 Application program downloading method and mobile terminal
CN107888940A (en) * 2016-09-30 2018-04-06 法乐第(北京)网络科技有限公司 Video and its related resource method for down loading and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1972275A (en) * 2005-11-25 2007-05-30 国际商业机器公司 Method and system for controlling the processing of requests for web resources
CN101369280A (en) * 2008-10-10 2009-02-18 深圳市茁壮网络技术有限公司 Method and device for web page browsing in digital television terminal
CN101382958A (en) * 2008-10-21 2009-03-11 深圳华为通信技术有限公司 Web page loading method and device
EP2224351A1 (en) * 2009-02-26 2010-09-01 Telefonaktiebolaget L M Ericsson (publ) method for use in association with a multi-tab interpretation and rendering function
CN102737116A (en) * 2012-05-29 2012-10-17 深圳市同洲电子股份有限公司 Method and device for storing webpage resources
CN103631916A (en) * 2013-11-29 2014-03-12 北京奇虎科技有限公司 Method and device for downloading downloadable resources
CN103685381A (en) * 2012-09-12 2014-03-26 腾讯科技(深圳)有限公司 Method, system and device for downloading webpage resources

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101689745B1 (en) * 2010-09-06 2016-12-27 삼성전자주식회사 Web browsing system and method for rendering dynamic resource URI of script

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1972275A (en) * 2005-11-25 2007-05-30 国际商业机器公司 Method and system for controlling the processing of requests for web resources
CN101369280A (en) * 2008-10-10 2009-02-18 深圳市茁壮网络技术有限公司 Method and device for web page browsing in digital television terminal
CN101382958A (en) * 2008-10-21 2009-03-11 深圳华为通信技术有限公司 Web page loading method and device
EP2224351A1 (en) * 2009-02-26 2010-09-01 Telefonaktiebolaget L M Ericsson (publ) method for use in association with a multi-tab interpretation and rendering function
CN102737116A (en) * 2012-05-29 2012-10-17 深圳市同洲电子股份有限公司 Method and device for storing webpage resources
CN103685381A (en) * 2012-09-12 2014-03-26 腾讯科技(深圳)有限公司 Method, system and device for downloading webpage resources
CN103631916A (en) * 2013-11-29 2014-03-12 北京奇虎科技有限公司 Method and device for downloading downloadable resources

Also Published As

Publication number Publication date
CN104123365A (en) 2014-10-29

Similar Documents

Publication Publication Date Title
US10048948B2 (en) Optimized retrieval of custom string resources
US20170169001A1 (en) Combining server-side and client-side user interface elements
US9355081B2 (en) Transforming HTML forms into mobile native forms
KR102006396B1 (en) Identifying matching applications based on browsing activity
KR101824222B1 (en) Fast rendering of websites containing dynamic content and stale content
US20150295942A1 (en) Method and server for performing cloud detection for malicious information
CN103095681B (en) A kind of method and device detecting leak
US8365203B2 (en) Method for creating a native application for mobile communications device in real-time
RU2604326C2 (en) Webpage browsing method, webapp framework, method and device for executing javascript and mobile terminal
JP5505671B2 (en) Update notification method and browser
RU2614572C2 (en) Method, system and device for filtering advertisement web pages on mobile terminal
TWI528282B (en) Method for customizing launching of applications
US7669149B2 (en) Matching user interface elements to screen reader functions
JP5894266B2 (en) Application tile presentation format
KR20160061305A (en) Method and apparatus for customized software development kit (sdk) generation
US20190243866A1 (en) Mobile enablement of existing web sites
US7409422B2 (en) Declarative page view and click tracking systems and methods
US8635548B2 (en) Configuring a page for drag and drop arrangement of content artifacts in a page development tool
US7853593B2 (en) Content markup transformation
US8468145B2 (en) Indexing of URLs with fragments
WO2015143956A1 (en) Method and apparatus for blocking advertisement in web page
US7921353B1 (en) Method and system for providing client-server injection framework using asynchronous JavaScript and XML
US9753843B2 (en) Automated testing of web-based applications
US9928088B2 (en) Method, apparatus, server and system for implementing web application
US20140068420A1 (en) Systems and methods for hosted applications

Legal Events

Date Code Title Description
PB01 Publication
C06 Publication
SE01 Entry into force of request for substantive examination
C10 Entry into substantive examination
GR01 Patent grant
GR01 Patent grant