Movatterモバイル変換


[0]ホーム

URL:


CN102214224A - Network resource access optimizing method, Web page browser and terminal - Google Patents

Network resource access optimizing method, Web page browser and terminal
Download PDF

Info

Publication number
CN102214224A
CN102214224ACN2011101606547ACN201110160654ACN102214224ACN 102214224 ACN102214224 ACN 102214224ACN 2011101606547 ACN2011101606547 ACN 2011101606547ACN 201110160654 ACN201110160654 ACN 201110160654ACN 102214224 ACN102214224 ACN 102214224A
Authority
CN
China
Prior art keywords
file
path
request
chained file
url
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2011101606547A
Other languages
Chinese (zh)
Inventor
刘军
路芳芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE CorpfiledCriticalZTE Corp
Priority to CN2011101606547ApriorityCriticalpatent/CN102214224A/en
Publication of CN102214224ApublicationCriticalpatent/CN102214224A/en
Priority to PCT/CN2012/073216prioritypatent/WO2012171391A1/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

The invention provides a network resource access optimizing method, a Web browser and a terminal. The method comprises the following steps: receiving a request of accessing an external link file, and analyzing an absolute path of the external link file in a service server from a path uniform resource locator (URL) in the webpage; detecting whether file data corresponding to the absolute path is cached or not, and canceling the request of accessing the external link file if so, otherwise initiating the request of accessing the external link file. By the method, the external link file can be accurately accessed, and the path of the external link file can be screened, and the same external link file can avoid multiple request accesses to the service server even in different paths, so that the aims of saving network resources and equipment resources can be achieved.

Description

A kind of optimization method of accesses network resource, web browser and terminal
Technical field
The present invention relates to the software application field, relate in particular to a kind of optimization method, Web(webpage of accesses network resource) browser and terminal.
Background technology
Internet development is rapid, its main carrier is with HTML(Hyper Text Mark-up Language, HTML (Hypertext Markup Language)) coded file is the html web page on basis, and used a large amount of outer chained files at html web page, for example: script file (for example JavaScript file), CSS(Cascading Style Sheet, CSS (cascading style sheet)) file, image file (BMP(bitmap for example, the bitmap picture) file, JPEG(Joint Photographic Experts Group, JPEG (joint photographic experts group)) file, GIF(Graphics Interchange Format, graphic interchange format) file, PNG(Portable Network Graphic Format, streaming network graphic form) file) or the like.The page development person may exist and repeatedly use same outer chained file in the html file in writing concrete page code process, but the path of corresponding outer chained file may be different in html file.For example: the test.jpg file is at server home(homepage) under the file, at the test.jpg file under the home file, in the page, may occur following outside the path literary style of chained file, be designated as respectively: path 1, path 2:
Path 1:http: // 127.0.0.1/home/webserver/../test.jpg;
Path 2:http: // 127.0.0.1/home/httpserver/../test.jpg;
Above-mentioned path 1, path 2 all are the test.jpg file that points under the server home catalogue in fact, and it is at terminal, and the absolute path of this document is:
http://127.0.0.1/home/test.jpg。
But in the terminal browser, outside being resolved to, during the path of chained file, resolve to two different path URL(Uniform/Universal Resource Locator respectively, URL(uniform resource locator)), initiate the request of resource access to service server.Though general browser is two different URL with path 1 and path 2, be to point to same outer chained file on the service server in fact, but the terminal browser but sends twice request to service server, and all there is waste in the resource of service server resource and terminal device.When the Web file had identical and the situation that the path is different of a large amount of outer chained files, the visit simultaneously of a large amount of terminal devices can very easily cause the service server overload, and operation brings certain risk to system.
Summary of the invention
The technical problem to be solved in the present invention provides a kind of optimization method, Web browser and terminal of accesses network resource, avoiding repeatedly asking visit to service server, thereby reach the purpose of saving Internet resources and the resource of equipment own at outer chained file with different paths.
In order to solve the problems of the technologies described above, the invention provides a kind of optimization method of accesses network resource, comprising:
Receive the visit outer chained file request after, outside described, parse in the path URL(uniform resource locator) (URL) of chained file the page described outside the absolute path of chained file in service server;
Detect whether be cached with described absolute path corresponding file data,, then cancel the request of the outer chained file of described visit if having; If do not have, then initiate the request of the outer chained file of described visit.
Further, said method also has following characteristics: after the request of the outer chained file of the described visit of described initiation, also comprise:
Download described outer chained file corresponding file data, and preserve the corresponding relation of described absolute path and downloaded files data.
Further, said method also has following characteristics: described outside described, parse among the path URL of chained file the page described outside the step of the absolute path of chained file in service server comprise:
Judge whether described path URL comprises the file path symbol, if do not have, then with described path URL as the absolute path of described outer chained file in service server; If have, then simplify to handle obtaining the absolute path of described outer chained file in service server according to the implication of described file path symbol.
Further, said method also has following characteristics: described outer chained file comprises one or more in script file, CSS (cascading style sheet) file and the image file.
In order to address the above problem, the present invention also provides a kind of web page server, comprising:
Parsing module, be used to receive the request of the outer chained file of visit after, outside described, parse in the path URL(uniform resource locator) (URL) of chained file the page described outside the absolute path of chained file in service server;
The access process module is used for detecting whether be cached with described absolute path corresponding file data, if having, then cancels the request of the outer chained file of described visit; If do not have, then initiate the request of the outer chained file of described visit.
Further, above-mentioned web page server also has following characteristics: also comprise:
Download module is used for after described access process module is initiated the request of chained file outside the described visit, downloads described outer chained file corresponding file data.
Further, above-mentioned web page server also has following characteristics: also comprise:
Cache module is used to preserve the corresponding relation of described absolute path and described download module downloaded files data.
Further, above-mentioned web page server also has following characteristics:
Described parsing module, specifically be used to receive the request of the outer chained file of visit after, judge whether described path URL comprises the file path symbol, as if not having, then with described path URL as the absolute path of described outer chained file in service server; If have, then simplify to handle obtaining the absolute path of described outer chained file in service server according to the implication of described file path symbol.
Further, above-mentioned web page server also has following characteristics: described outer chained file comprises one or more in script file, CSS (cascading style sheet) file and the image file.
In order to address the above problem, the present invention also provides a kind of terminal, comprising: above-mentioned web page server.
To sum up, the invention provides a kind of optimization method, Web browser and terminal of accesses network resource, the present invention can either correctly have access to outer chained file, and can realize outreaching file path and screen processing, even the different paths of same outer chained file can be avoided repeatedly asking visit to service server, thereby reach the purpose of saving Internet resources and the resource of equipment own.
Description of drawings
Fig. 1 is the synoptic diagram of the Web server of the embodiment of the invention;
Fig. 2 is the process flow diagram of the optimization method of a kind of accesses network resource of the present invention;
Fig. 3 is the process flow diagram of optimization method of a kind of accesses network resource of the embodiment of the invention.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, hereinafter will be elaborated to embodiments of the invention in conjunction with the accompanying drawings.Need to prove that under the situation of not conflicting, embodiment among the application and the feature among the embodiment be combination in any mutually.
Fig. 1 is the synoptic diagram of the Web server of the embodiment of the invention, and as shown in Figure 1, the Web server of present embodiment comprises:
Parsing module, be used to receive the request of the outer chained file of visit after, outside described, parse among the path URL of chained file the page described outside the absolute path of chained file in service server;
The access process module is used for detecting whether be cached with described absolute path corresponding file data, if having, then cancels the request of the outer chained file of described visit; If do not have, then initiate the request of the outer chained file of described visit.
Wherein, described parsing module specifically is used for after receiving the request of the outer chained file of visit, judges whether described path URL comprises the file path symbol, as if not having, then with described path URL as the absolute path of described outer chained file in service server; If have, then simplify to handle obtaining the absolute path of described outer chained file in service server according to the implication of described file path symbol.
In the present embodiment, described Web server can also comprise:
Download module is used for after described access process module is initiated the request of chained file outside the described visit, downloads described outer chained file corresponding file data.
Cache module is used to preserve the corresponding relation of described absolute path and described download module downloaded files data.
Wherein, described outer chained file comprises one or more in script file, CSS (cascading style sheet) file and the image file.
The present invention also provides a kind of terminal, and this terminal comprises above-mentioned Web server.
Fig. 2 is the process flow diagram of the optimization method of a kind of accesses network resource of the present invention, and as shown in Figure 2, this method comprises following step:
S10, receive the visit outer chained file request after, outside described, parse among the path URL of chained file the page described outside the absolute path of chained file in service server;
Whether S20, detection are cached with described absolute path corresponding file data, if having, then cancel the request of the outer chained file of described visit; If do not have, then initiate the request of the outer chained file of described visit.
Method of the present invention can be avoided initiating repeatedly request to service server for the outer chained file that has multipath in the Web page, thereby causes the problem of the wasting of resources.
The embodiment of the invention recomputates Web browser and resolves the path URL of outer chained file in the page, for example, path symbols such as similar among the URL of path " ../", " ./", " // " are simplified calculating, the result who calculates is the absolute path that does not comprise the outer chained file of symbols such as similar " ../", " ./", " // ", detects so that Web browser carries out outer chained file related data.
Introduce the file cache function in the Web browser end side, the data of the outer chained file of soon having visited are preserved, and also preserve the mapping relations of the absolute path of outer chained file data and this outer chained file in addition.
Fig. 3 is the process flow diagram of optimization method of the accesses network resource of the embodiment of the invention, as shown in Figure 3, comprises following step:
Step 101, Web browser receive the request of the outer chained file of visit;
Step 102, Web browser are resolved the Web page, and encode the page the path URL of appointment of chained file parses absolute path outside described;
Particularly, behind the path URL that chained file defines outside Web browser is resolved, judge whether this path URL exists the file path symbol in the page, as " ../" " ./" " // " etc., as do not have above-mentioned path symbol, then do not need to carry out the path and simplify processing, directly return path URL; If the path comprises above-mentioned path symbol, then need to carry out the path and simplify processing according to the symbol implication, the path URL after the processing is the absolute path of outer chained file in service server.
Whetherstep 103, Web browser detect absolute path corresponding file data buffer memory mistake, if the buffer memory mistake then turns tostep 104; If there is not buffer memory, then turn tostep 105;
Step 104, directly use the associated documents data of buffer memory;
Step 105, download associated documents data, buffer memory this document data after download is finished, and preserve the absolute path of this document and the corresponding relation of file data, so that subsequent query.
One of ordinary skill in the art will appreciate that all or part of step in the said method can instruct related hardware to finish by program, described program can be stored in the computer-readable recording medium, as ROM (read-only memory), disk or CD etc.Alternatively, all or part of step of the foregoing description also can use one or more integrated circuit to realize.Correspondingly, each the module/unit in the foregoing description can adopt the form of hardware to realize, also can adopt the form of software function module to realize.The present invention is not restricted to the combination of the hardware and software of any particular form.
Below only be the preferred embodiments of the present invention; certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection domain of the appended claim of the present invention.

Claims (10)

CN2011101606547A2011-06-152011-06-15Network resource access optimizing method, Web page browser and terminalPendingCN102214224A (en)

Priority Applications (2)

Application NumberPriority DateFiling DateTitle
CN2011101606547ACN102214224A (en)2011-06-152011-06-15Network resource access optimizing method, Web page browser and terminal
PCT/CN2012/073216WO2012171391A1 (en)2011-06-152012-03-29Network resource access optimization method, web browser, and terminal

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN2011101606547ACN102214224A (en)2011-06-152011-06-15Network resource access optimizing method, Web page browser and terminal

Publications (1)

Publication NumberPublication Date
CN102214224Atrue CN102214224A (en)2011-10-12

Family

ID=44745532

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN2011101606547APendingCN102214224A (en)2011-06-152011-06-15Network resource access optimizing method, Web page browser and terminal

Country Status (2)

CountryLink
CN (1)CN102214224A (en)
WO (1)WO2012171391A1 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102081633A (en)*2009-11-272011-06-01阿里巴巴集团控股有限公司JavaScript file management method, device and system
WO2012171391A1 (en)*2011-06-152012-12-20中兴通讯股份有限公司Network resource access optimization method, web browser, and terminal
CN103294718A (en)*2012-02-292013-09-11腾讯科技(深圳)有限公司Method and device for web page cache management
CN103391285A (en)*2013-07-032013-11-13杭州华三通信技术有限公司Web access optimization device and method
CN103795690A (en)*2012-10-312014-05-14华为技术有限公司Cloud access control method, proxy server, and cloud access control system
CN104348803A (en)*2013-07-312015-02-11深圳市腾讯计算机系统有限公司Link hijacking detecting method and device, user equipment, analysis server and link hijacking detecting system
CN103763340B (en)*2013-12-242017-07-04新华三技术有限公司A kind of apparatus and method of web access optimization
CN107239475A (en)*2016-03-292017-10-10阿里巴巴集团控股有限公司One kind calls document method and device
CN107704464A (en)*2016-08-082018-02-16北京国双科技有限公司Parse the method and device in the path of static resource

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
DE60136107D1 (en)*2001-08-032008-11-20Nokia Corp METHOD, SYSTEM AND DEVICE FOR DATA NETWORKS WITH DISTRIBUTED CACHE STORAGE
KR100644547B1 (en)*2005-11-032006-11-10엘지전자 주식회사 Hypertext data caching method of mobile communication terminal and mobile communication terminal for same
CN101719936A (en)*2009-12-092010-06-02成都市华为赛门铁克科技有限公司Method, device and cache system for providing file downloading service
CN102214224A (en)*2011-06-152011-10-12中兴通讯股份有限公司Network resource access optimizing method, Web page browser and terminal

Cited By (13)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102081633A (en)*2009-11-272011-06-01阿里巴巴集团控股有限公司JavaScript file management method, device and system
WO2012171391A1 (en)*2011-06-152012-12-20中兴通讯股份有限公司Network resource access optimization method, web browser, and terminal
CN103294718A (en)*2012-02-292013-09-11腾讯科技(深圳)有限公司Method and device for web page cache management
CN103795690A (en)*2012-10-312014-05-14华为技术有限公司Cloud access control method, proxy server, and cloud access control system
CN103391285B (en)*2013-07-032016-12-28杭州华三通信技术有限公司The apparatus and method that a kind of web access optimizes
CN103391285A (en)*2013-07-032013-11-13杭州华三通信技术有限公司Web access optimization device and method
CN104348803A (en)*2013-07-312015-02-11深圳市腾讯计算机系统有限公司Link hijacking detecting method and device, user equipment, analysis server and link hijacking detecting system
CN104348803B (en)*2013-07-312018-12-11深圳市腾讯计算机系统有限公司Link kidnaps detection method, device, user equipment, Analysis server and system
CN103763340B (en)*2013-12-242017-07-04新华三技术有限公司A kind of apparatus and method of web access optimization
CN107239475A (en)*2016-03-292017-10-10阿里巴巴集团控股有限公司One kind calls document method and device
CN107239475B (en)*2016-03-292020-09-18阿里巴巴集团控股有限公司File calling method and device
CN107704464A (en)*2016-08-082018-02-16北京国双科技有限公司Parse the method and device in the path of static resource
CN107704464B (en)*2016-08-082021-05-07北京国双科技有限公司Method and device for analyzing path of static resource

Also Published As

Publication numberPublication date
WO2012171391A1 (en)2012-12-20

Similar Documents

PublicationPublication DateTitle
CN102214224A (en)Network resource access optimizing method, Web page browser and terminal
CN100594493C (en)Method for delivering content to mobile devices
US8856263B2 (en)Systems and methods thereto for acceleration of web pages access using next page optimization, caching and pre-fetching techniques
JP5022301B2 (en) Proxy server, communication relay program, and communication relay method
CN102932197B (en)Testing method and system
CN105095280B (en)Browser caching method and device
CN102647417B (en)The implementation method of network access, device and system and network system
CN101287013B (en)Method for updating Webpage and Web proxy device
CN104426925B (en)Web page resources acquisition methods and device
CN103500194A (en)Method, device and browser for loading webpage
US7987243B2 (en)Method for media discovery
US9785710B2 (en)Automatic crawling of encoded dynamic URLs
CN101662464A (en)System for realizing HTTP request service and method thereof
TW201800962A (en)Webpage file sending method, webpage rendering method and device and webpage rendering system
KR20140096063A (en)Browser core adaptation method and browser
CN104361067A (en)Method and system for intelligent loading of browser webpage information
JP2008537202A (en) A device-independent addressing system that accesses web pages via public mobile networks
CN104704495B (en) Method and device for information search
CN103347069A (en)Method and device for realizing network access
US11829434B2 (en)Method, apparatus and computer program for collecting URL in web page
US20100023888A1 (en)Method and apparatus for controlling focus of application
CN106911733B (en) Website access method and device for cloud proxy
CN103605486A (en)Browser, method and system for realizing synchronous printing
CN101158974A (en)Method and device for quoting resource
JP5565197B2 (en) Web application linkage method, linkage apparatus, and linkage program

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
WD01Invention patent application deemed withdrawn after publication
WD01Invention patent application deemed withdrawn after publication

Application publication date:20111012


[8]ページ先頭

©2009-2025 Movatter.jp