CN103324756A - Method and device for increasing access speed of browser - Google Patents

Method and device for increasing access speed of browser Download PDF

Info

Publication number
CN103324756A
CN103324756A CN201310286582XA CN201310286582A CN103324756A CN 103324756 A CN103324756 A CN 103324756A CN 201310286582X A CN201310286582X A CN 201310286582XA CN 201310286582 A CN201310286582 A CN 201310286582A CN 103324756 A CN103324756 A CN 103324756A
Authority
CN
China
Prior art keywords
pagefile
resource file
buffer memory
browser
file content
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
CN201310286582XA
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.)
Xingyun Rongchuang Beijing Technology Co Ltd
Original Assignee
Nebula Creation (beijing) Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nebula Creation (beijing) Information Technology Co Ltd filed Critical Nebula Creation (beijing) Information Technology Co Ltd
Priority to CN201310286582XA priority Critical patent/CN103324756A/en
Publication of CN103324756A publication Critical patent/CN103324756A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention belongs to the technical field of the Internet, and provides a method and a device for increasing the access speed of a browser. The method is applied to a web proxy gateway. The method comprises the steps of obtaining page files corresponding to page requests when the page requests of the browser are received, analyzing the page files, obtaining file names of resource files referenced in the page files, obtaining the content of the resource files corresponding to the file names, replacing portion, referencing the resource files, in the page files with the content of the corresponding resource files, and returning the page files after being replaced to the browser. According to the method, and the access speed of the browser can be increased without modifying a source website.

Description

A kind of method and device that improves browser access speed
Technical field
The present invention relates to internet arena, particularly a kind of method and device that improves browser access speed.
Background technology
In the time of browser access web website, html file and style sheet file (such as the css file), page script file (such as the js file) are separately to download, need to repeatedly connect with the web website, and because browser need to could be downloaded style sheet file and page script file after having resolved the html content, causing downloading process is serial.These problems can cause prolonging the time that browser is opened the page, affect user's viewing experience.
Summary of the invention
In view of this, the purpose of this invention is to provide a kind of method and device that improves browser access speed, do not need to be made amendment in the website, source, just can improve the access speed of browser.
For achieving the above object, the invention provides technical scheme as follows:
A kind of method that improves browser access speed is applied in the web proxy gateway, and described method comprises:
When receiving the page request of browser, obtain pagefile corresponding to described page request;
Described pagefile is resolved, obtain the filename of the resource file of quoting in the described pagefile;
Obtain resource file content corresponding to described filename;
The part of quoting resource file in the pagefile is replaced with corresponding resource file content, and the pagefile after will replacing returns to described browser.
Above-mentioned method, wherein, described pagefile corresponding to described page request that obtain comprises:
Judge whether there is described pagefile in the buffer memory, if from buffer memory, obtain described pagefile; Otherwise, obtain described pagefile from the website, source, and the pagefile that gets access to added in the buffer memory.
Above-mentioned method, wherein, described resource file content corresponding to described filename of obtaining comprises:
Judge whether there is described resource file content in the buffer memory, if from buffer memory, obtain described resource file content; Otherwise, obtain described resource file content from the website, source, and the described resource file content that gets access to added in the buffer memory.
Above-mentioned method, wherein, described resource file comprises: style sheet file and page script file.
A kind of device that improves browser access speed is applied in the web proxy gateway, and described device comprises:
The pagefile acquiring unit when being used for receiving the page request of browser, obtains pagefile corresponding to described page request;
The pagefile resolution unit is used for described pagefile is resolved, and obtains the filename of the resource file of quoting in the described pagefile;
The resource file acquiring unit is used for obtaining resource file content corresponding to described filename;
Replacement unit replace with corresponding resource file content for the part of pagefile being quoted resource file, and the pagefile after will replacing returns to described browser.
Above-mentioned device, wherein, described pagefile acquiring unit is further used for:
Judge whether there is described pagefile in the buffer memory, if from buffer memory, obtain described pagefile; Otherwise, obtain described pagefile from the website, source, and the pagefile that gets access to added in the buffer memory.
Above-mentioned device, wherein, described resource file acquiring unit is further used for:
Judge whether there is described resource file content in the buffer memory, if from buffer memory, obtain described resource file content; Otherwise, obtain described resource file content from the website, source, and the described resource file content that gets access to added in the buffer memory.
Above-mentioned device, wherein, described resource file comprises: style sheet file and page script file.
Compared with prior art, the present invention has following beneficial effect:
By on the web proxy gateway with resource file, for example the content of js file and css file merges in the html file, has reduced the request number of times of browser;
Reduced connection procedure after the merged file, can the Effective Raise file downloading speed;
Owing to being to realize that in the web proxy gateway content merges, and does not therefore need to be made amendment in the web source station.
Description of drawings
Fig. 1 is the system construction drawing that improves according to an embodiment of the invention browser access speed;
Fig. 2 is the structure drawing of device that improves according to an embodiment of the invention browser access speed;
Fig. 3 is the method flow diagram that improves according to an embodiment of the invention browser access speed;
Fig. 4 is that the web proxy gateway carries out the contrast schematic diagram that resource content merges front and back browse request process.
Embodiment
Describe the present invention below in conjunction with accompanying drawing.
In order to improve the access speed of browser, automatically for example style sheet file, page script file merge the embodiment of the invention with its related resource file of quoting with the html file on the web proxy gateway, browser only need to once ask just can get access to the content of the whole html page, thereby shortened the time that browser is opened the page, and, in page optimizing process, source web website does not need to carry out any modification.
Fig. 1 is the system construction drawing that improves according to an embodiment of the invention browser access speed.With reference to Fig. 1, described system can comprise user terminal 10, web proxy gateway 20 and Website server 30, and web proxy gateway 20 is between user terminal 10 and Website server 30, and a web proxy gateway 20 can connect one or more Website servers 30.
Wherein, user browser 11 is installed in the user terminal 10, browser refers to can the display web page server or the html file content of file system, and allows a kind of software of user and these file interactions, can be the browsers such as IE, firefox, chrome.Web browser is mainly mutual by http protocol and web page server and obtain webpage, and these webpages are specified by URL(uniform resource locator) (URL), and file layout is generally HTML, and is indicated in http protocol by MIME.User terminal 10 can be the wired or wireless communication device, for example, and computing machine, mobile phone, personal digital assistant (PDA) etc.Store one or more webpages 31 on the Website server 30.
Web proxy gateway 20 is a kind of reverse proxys, and browser 11 can obtain webpage 31 in the Website server 30 by web proxy gateway 20.Particularly, the page request of 11 pairs of Website servers 30 of browser (for example http request) can at first arrive web proxy gateway 20, after web proxy gateway 20 receives the page request of browser 11, the pagefile of checking request whether exist with local cache in, if, then from buffer memory, take out pagefile and return to browser 11, otherwise, after obtaining pagefile, Website server 30 returns to browser 11, and described pagefile added in the local cache, like this, when web proxy gateway 20 receives the request of this pagefile again, can directly from local cache, obtain this pagefile.
Different being of the embodiment of the invention and prior art, web proxy gateway 20 is except buffer memory pagefile (web page files), can also automatically identify the resource file of quoting in the html page, the resource file of quoting be merged to return to browser 11 in the pagefile file.By carrying out the merging of file content, reduce the pagefile the number of transmissions, improve simultaneously speed of download.
Need to prove, web proxy gateway 20 normally carries out buffer memory to static resource, and some html file is static resource, and some html file is dynamic resource, and like this, web proxy gateway 20 just carries out buffer memory to the html file as static resource.In addition, style sheet file (such as the css file), page script file (such as the js file) etc. is static resource, and web proxy gateway 20 can carry out buffer memory to it.
Below provide the specific implementation of web proxy gateway 20.
Fig. 2 is the structure drawing of device that improves according to an embodiment of the invention browser access speed, and described device is arranged in the web proxy gateway 20.With reference to Fig. 2, described device can comprise pagefile acquiring unit 21, pagefile resolution unit 22, resource file acquiring unit 23 and replacement unit 24.
The principle of work of this device is:
When pagefile acquiring unit 21 receives the page request (http request) of browser, can obtain pagefile corresponding to described page request (for example html file);
22 pairs of described pagefiles of pagefile resolution unit are resolved, and obtain the filename of the resource file of quoting in the described pagefile; Pagefile resolution unit 22 also can be obtained the url of the resource file of quoting in the described pagefile or file path etc.
Resource file acquiring unit 23 obtains resource file content corresponding to described filename; Resource file acquiring unit 23 can obtain according to the url of resource file or file path etc. the content of this resource file.
Replacement unit 24 replaces with corresponding resource file content with the part of quoting resource file in the pagefile, and the pagefile after will replacing returns to described browser.
Wherein, described pagefile acquiring unit 21 also further judges whether there be pagefile corresponding to this page request in the buffer memory, if obtain described pagefile from buffer memory when receiving the page request of browser; Otherwise, obtain described pagefile from the website, source, and the pagefile that gets access to added in the buffer memory.As previously mentioned, the pagefile that needs buffer memory here should be static resource, does not carry out buffer memory for dynamic pagefile.
When described resource file acquiring unit 23 need to obtain the resource file of quoting in the pagefile, at first judge whether there is described resource file content in the buffer memory, if from buffer memory, obtain described resource file content; Otherwise, obtain described resource file content from the website, source, and the described resource file content that gets access to added in the buffer memory.Described resource file can be the static resources such as style sheet file and page script file, resource file is carried out buffer memory after, follow-up to this resource file request and can directly from buffer memory, obtain.
Fig. 3 is the method flow diagram that improves according to an embodiment of the invention browser access speed, described method is applied to (each step among Fig. 3 is carried out by the web proxy gateway) in the web proxy gateway, the web proxy gateway is between user terminal and Website server, a web proxy gateway can connect one or more Website servers, user browser is installed in the user terminal, stores one or more webpages on the Website server.
With reference to Fig. 3, described method can comprise the steps:
Step 301 when receiving the page request of browser, is obtained pagefile corresponding to described page request;
Page request is generally the http request, when receiving the http request, at first judges whether there is corresponding html pagefile in the buffer memory, if obtain described pagefile from buffer memory; Otherwise, obtain described pagefile from the website, source, and the pagefile that gets access to is added in the buffer memory, when needing to obtain pagefile, can directly from buffer memory, obtain next time.
Step 302 is resolved described pagefile, obtains the filename of the resource file of quoting in the described pagefile;
In this step, also can obtain the url of the resource file of quoting in the described pagefile or file path etc.
Step 303 is obtained resource file content corresponding to described filename;
At first judge whether there is described resource file content in the buffer memory, if from buffer memory, obtain described resource file content; Otherwise, obtain described resource file content from the website, source, and the described resource file content that gets access to is added in the buffer memory, when needing the Gains resources file, can directly from buffer memory, obtain next time.Wherein, described resource file can be the static resources such as style sheet file and page script file.
In this step, also can obtain according to the url of resource file or file path etc. the content of this resource file.
Step 304 part of quoting resource file in the pagefile is replaced with corresponding resource file content, and the pagefile after will replacing returns to described browser.
Below provide an application example of the present invention.
After supposing that the web proxy gateway receives the http request of browser, the html file that gets access to (the html code before merging) is as follows:
Figure BDA00003485285700061
Figure BDA00003485285700071
Can obtain by resolving, comprised quoting 4 files in the described html file, be respectively :/skins/main.css ,/clean.css, headjs ,/bodyjs, so, the web proxy gateway obtains the content of file from buffer memory or these file place Website servers (source station), and merge in the html file, the html code after the merging is as follows:
Figure BDA00003485285700072
Can find out, the embodiment of the invention is connected the js file in the html page and replaces with real file content with the css file, as required, can also do some corresponding adjustment, and page script and style sheet can normally be shown.Then, the html file after directly will merging returns to browser.
Fig. 4 is that the web proxy gateway carries out the contrast schematic diagram that resource content merges front and back browse request process.As shown in Figure 4, browser need to be set up 5 connections when not merging, and transmits 5 files and just can demonstrate the page, and the final time is at dotted line position; After the web acting server has been done and has been merged, browser only is connected 1 connection with the web acting server, merged other js files and css file in the html file, browser just can demonstrate the page in the dot-and-dash line position, and the time that browser is opened the page shortens greatly than before merging.
Need to prove, can in such as the computer system that is provided with one group of computer executable instructions, carry out in the step shown in the process flow diagram of accompanying drawing, and, although there is shown logical order in flow process, but in some cases, can carry out step shown or that describe with the order that is different from herein.In addition, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with general calculation element, they can concentrate on the single calculation element, perhaps be distributed on the network that a plurality of calculation elements form, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in the memory storage and be carried out by calculation element, perhaps they are made into respectively each integrated circuit modules, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The above only is preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of making, is equal to replacement, improvement etc., all should be included within the scope of protection of the invention.

Claims (8)

1. a method that improves browser access speed is applied to it is characterized in that in the web proxy gateway, and described method comprises:
When receiving the page request of browser, obtain pagefile corresponding to described page request;
Described pagefile is resolved, obtain the filename of the resource file of quoting in the described pagefile;
Obtain resource file content corresponding to described filename;
The part of quoting resource file in the pagefile is replaced with corresponding resource file content, and the pagefile after will replacing returns to described browser.
2. the method for claim 1 is characterized in that, described pagefile corresponding to described page request that obtain comprises:
Judge whether there is described pagefile in the buffer memory, if from buffer memory, obtain described pagefile; Otherwise, obtain described pagefile from the website, source, and the pagefile that gets access to added in the buffer memory.
3. the method for claim 1 is characterized in that, described resource file content corresponding to described filename of obtaining comprises:
Judge whether there is described resource file content in the buffer memory, if from buffer memory, obtain described resource file content; Otherwise, obtain described resource file content from the website, source, and the described resource file content that gets access to added in the buffer memory.
4. such as claim 1,2 or 3 described methods, it is characterized in that, described resource file comprises:
Style sheet file and page script file.
5. a device that improves browser access speed is applied to it is characterized in that in the web proxy gateway, and described device comprises:
The pagefile acquiring unit when being used for receiving the page request of browser, obtains pagefile corresponding to described page request;
The pagefile resolution unit is used for described pagefile is resolved, and obtains the filename of the resource file of quoting in the described pagefile;
The resource file acquiring unit is used for obtaining resource file content corresponding to described filename;
Replacement unit replace with corresponding resource file content for the part of pagefile being quoted resource file, and the pagefile after will replacing returns to described browser.
6. device as claimed in claim 5 is characterized in that, described pagefile acquiring unit is further used for:
Judge whether there is described pagefile in the buffer memory, if from buffer memory, obtain described pagefile; Otherwise, obtain described pagefile from the website, source, and the pagefile that gets access to added in the buffer memory.
7. device as claimed in claim 5 is characterized in that, described resource file acquiring unit is further used for:
Judge whether there is described resource file content in the buffer memory, if from buffer memory, obtain described resource file content; Otherwise, obtain described resource file content from the website, source, and the described resource file content that gets access to added in the buffer memory.
8. such as claim 5,6 or 7 described devices, it is characterized in that, described resource file comprises:
Style sheet file and page script file.
CN201310286582XA 2013-07-09 2013-07-09 Method and device for increasing access speed of browser Pending CN103324756A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310286582XA CN103324756A (en) 2013-07-09 2013-07-09 Method and device for increasing access speed of browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310286582XA CN103324756A (en) 2013-07-09 2013-07-09 Method and device for increasing access speed of browser

Publications (1)

Publication Number Publication Date
CN103324756A true CN103324756A (en) 2013-09-25

Family

ID=49193499

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310286582XA Pending CN103324756A (en) 2013-07-09 2013-07-09 Method and device for increasing access speed of browser

Country Status (1)

Country Link
CN (1) CN103324756A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104965764A (en) * 2015-06-02 2015-10-07 百度在线网络技术(北京)有限公司 Static resource processing method and apparatus
WO2015196442A1 (en) * 2014-06-27 2015-12-30 华为技术有限公司 Webpage optimization device and method
CN106708936A (en) * 2016-11-21 2017-05-24 北京天融信网络安全技术有限公司 Webpage optimization method and apparatus
CN107306292A (en) * 2016-04-25 2017-10-31 北京京东尚科信息技术有限公司 Service end webpage includes implementation method and device
CN108616552A (en) * 2016-12-13 2018-10-02 腾讯科技(深圳)有限公司 Web access method, device and system
CN108804707A (en) * 2018-06-21 2018-11-13 腾讯科技(深圳)有限公司 A kind of page processing method, device and relevant device
CN109101625A (en) * 2018-08-13 2018-12-28 中国建设银行股份有限公司 A kind of web cache method and device
CN112968939A (en) * 2017-01-05 2021-06-15 创新先进技术有限公司 Mobile terminal resource loading method and device
CN113568701A (en) * 2021-09-28 2021-10-29 深圳市信润富联数字科技有限公司 Modal frame display method, device, equipment and storage medium
CN114422491A (en) * 2021-12-20 2022-04-29 福州佳软软件技术有限公司 Method and terminal for improving page acquisition efficiency

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110099277A1 (en) * 2009-10-28 2011-04-28 Verizon Patent And Licensing, Inc. Network architecture for resource requests
CN102184231A (en) * 2011-05-12 2011-09-14 广州市动景计算机科技有限公司 Method and device for acquiring page resources

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110099277A1 (en) * 2009-10-28 2011-04-28 Verizon Patent And Licensing, Inc. Network architecture for resource requests
CN102184231A (en) * 2011-05-12 2011-09-14 广州市动景计算机科技有限公司 Method and device for acquiring page resources

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015196442A1 (en) * 2014-06-27 2015-12-30 华为技术有限公司 Webpage optimization device and method
CN105393247A (en) * 2014-06-27 2016-03-09 华为技术有限公司 Webpage optimization device and method
CN104965764A (en) * 2015-06-02 2015-10-07 百度在线网络技术(北京)有限公司 Static resource processing method and apparatus
CN107306292A (en) * 2016-04-25 2017-10-31 北京京东尚科信息技术有限公司 Service end webpage includes implementation method and device
CN106708936A (en) * 2016-11-21 2017-05-24 北京天融信网络安全技术有限公司 Webpage optimization method and apparatus
CN108616552B (en) * 2016-12-13 2021-06-11 腾讯科技(深圳)有限公司 Webpage access method, device and system
CN108616552A (en) * 2016-12-13 2018-10-02 腾讯科技(深圳)有限公司 Web access method, device and system
CN112968939A (en) * 2017-01-05 2021-06-15 创新先进技术有限公司 Mobile terminal resource loading method and device
CN112968939B (en) * 2017-01-05 2023-12-05 创新先进技术有限公司 Mobile terminal resource loading method and device
CN108804707A (en) * 2018-06-21 2018-11-13 腾讯科技(深圳)有限公司 A kind of page processing method, device and relevant device
CN108804707B (en) * 2018-06-21 2024-01-09 深圳市雅阅科技有限公司 Page processing method and device and related equipment
CN109101625A (en) * 2018-08-13 2018-12-28 中国建设银行股份有限公司 A kind of web cache method and device
CN109101625B (en) * 2018-08-13 2022-07-08 中国建设银行股份有限公司 Webpage caching method and device
CN113568701A (en) * 2021-09-28 2021-10-29 深圳市信润富联数字科技有限公司 Modal frame display method, device, equipment and storage medium
CN114422491A (en) * 2021-12-20 2022-04-29 福州佳软软件技术有限公司 Method and terminal for improving page acquisition efficiency
CN114422491B (en) * 2021-12-20 2024-01-30 福州佳软软件技术有限公司 Method and terminal for improving page acquisition efficiency

Similar Documents

Publication Publication Date Title
CN103324756A (en) Method and device for increasing access speed of browser
CN106575298B (en) Rapid presentation of web sites containing dynamic content and stale content
CN102438045B (en) Method and system for pre-fetching web page, and method for accessing web page
US8527862B2 (en) Methods for making ajax web applications bookmarkable and crawlable and devices thereof
CN103440276A (en) Method and device for improving webpage display speed
CN102279884B (en) Data acquiring and displaying method, system and Web server based on Web pages
CN103347089A (en) Method and device for separating and accelerating dynamic resources and static resources of website
CN104063460A (en) Method and device for loading webpage in browser
CN101178717A (en) Method for adaptation processing web page and web page adaptation device
CN103268319A (en) Cloud browser based on webpages
CN103347092A (en) Method and device for recognizing cacheable file
CN103401926B (en) A kind of method and device improving network resource accession speed
US20120331038A1 (en) Systems and methods for processing web service piped network requests
Pande et al. Enhanced web application and browsing performance through service-worker infusion framework
US20120117270A1 (en) Methods for reducing latency in network connections using automatic redirects and systems thereof
CN103258056B (en) Process the method for style design table, server, client and system
CN102510410A (en) On-line advertisement delivering method and system as well as advertisement control equipment
CN106850572B (en) Target resource access method and device
US11064052B2 (en) Page insertion method and device
CN102929489B (en) Client browser implementation method and client browser
CN102890687B (en) A kind of mthods, systems and devices browsing webpage picture group
CN103338278A (en) Accelerating method and device for web page browsing
CN101115064A (en) Network data storing, obtaining method and its implementing device
CN103605770A (en) Method and server for generating web page templates
CN103561068B (en) A kind of method and device improving web page browsing speed

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20151111

Address after: 100080, room 10, building 1, 3 Haidian Avenue, Beijing,, Haidian District

Applicant after: Xingyun Rongchuang (Beijing) Technology Co., Ltd.

Address before: 100080 Beijing City, Haidian District Haidian Street No. 3 electronic market office building A block 10 layer

Applicant before: Nebula creation (Beijing) Information Technology Co., Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20130925