CN107656934A - One kind preloads method, apparatus, equipment - Google Patents
One kind preloads method, apparatus, equipment Download PDFInfo
- Publication number
- CN107656934A CN107656934A CN201610590423.2A CN201610590423A CN107656934A CN 107656934 A CN107656934 A CN 107656934A CN 201610590423 A CN201610590423 A CN 201610590423A CN 107656934 A CN107656934 A CN 107656934A
- Authority
- CN
- China
- Prior art keywords
- webpage
- data
- domain name
- child resource
- protocol responses
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
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
-
- 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/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
- G06F16/9566—URL specific, e.g. using aliases, detecting broken or misspelled links
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)
Abstract
The embodiment of the invention discloses a kind of pre-add support method, including:Access request is sent to web page server, the access request includes the domain name of webpage to be shown;Protocol responses data corresponding with domain name are obtained from local, the protocol responses data include the domain name list of at least one child resource of the webpage to be shown;The transmission control protocol TCP that each child resource is established according to the domain name list of at least one child resource connects;The web data for the webpage to be shown that the web page server is sent is received, the web data includes the primary resource of the webpage to be shown;Load the primary resource of the webpage to be shown;The child resource of the webpage to be shown is loaded according to the TCP connections, forms the webpage to be shown.Further, the embodiment of the present invention also provides a kind of pre-load means and equipment.
Description
Technical field
The present invention relates to the information processing technology, more particularly to a kind of preloading method, apparatus, equipment.
Background technology
With the development of internet, website provides news, amusement, the material learnt, therefore as the new type of media for people
User accesses the various webpages of various websites commonly using browser in amusement or work.
In the prior art, when a certain webpage of the user by browser access website, browser is first to website service
Device sends access request, and the access request includes the domain name of the required webpage accessed.Described in Website server to browser transmission
The primary resource of webpage corresponding to the domain name that access request includes, after browser completes the response of the primary resource, website service
Device sends the child resource of webpage corresponding to the domain name that the access request includes to browser, in order to which browser is by the sub- money
Source is filled in the correspondence position of the primary resource.After primary resource and child resource respond completion, net described in browser-presented
Page, is easy to user to be watched.
But using the above method, browser needs respectively be downloaded resource, run, until related resource is whole
After the completion of loading, page presentation can be completed, usual user is seen corresponding to the link completely from being linked to for the triggering page
The time that the page needs is longer, generally more than 10 seconds, if the network site code design accessed needed for user is unreasonable, can cause
Treat that the time is longer, make page load time long, access speed is relatively low, and Consumer's Experience is poor.
The content of the invention
In order to solve the above technical problems, the embodiment of the present invention it is expected to provide a kind of preloading method, apparatus, equipment, can
The opening speed of webpage is improved, and then improves Consumer's Experience.
The technical proposal of the invention is realized in this way:
In a first aspect, the embodiment of the present invention provides a kind of pre-add support method, including:
Access request is sent to web page server, the access request includes the domain name of webpage to be shown;
Protocol responses data corresponding with domain name are obtained from local, the protocol responses data include described to be shown
The domain name list of at least one child resource of webpage;Each son is established according to the domain name list of at least one child resource
The transmission control protocol TCP connection of resource;
The web data for the webpage to be shown that the web page server is sent is received, the web data includes described
The primary resource of webpage to be shown;
Load the primary resource of the webpage to be shown;The child resource of the webpage to be shown is loaded according to the TCP connections,
Form the webpage to be shown.
Second aspect, the embodiment of the present invention provide a kind of pre-load means, including:
Transmitting element, for sending access request to web page server, the access request includes the domain of webpage to be shown
Name;
Unit is established, for obtaining protocol responses data corresponding with domain name, the protocol responses data from local
The domain name list of at least one child resource including the webpage to be shown;According to the domain name list of at least one child resource
Establish the transmission control protocol TCP connection of each child resource;
Receiving unit, the web data of the webpage to be shown sent for receiving the web page server, the net
Page data includes the primary resource of the webpage to be shown;
Loading unit, for loading the primary resource of the webpage to be shown;Loaded according to the TCP connections described to be shown
The child resource of webpage, form the webpage to be shown.
The third aspect, the embodiment of the present invention provide a kind of preload device, and the equipment includes communication interface and processor:
Wherein described processor, for sending access request, the access to web page server by the communication interface
Request includes the domain name of webpage to be shown;Protocol responses data corresponding with domain name, the protocol responses are obtained from local
Data include the domain name list of at least one child resource of the webpage to be shown;According to the domain name of at least one child resource
The transmission control protocol TCP connection of each child resource is established in list;The web service is received by the communication interface
The web data for the webpage to be shown that device is sent, the web data include the primary resource of the webpage to be shown;Loading
The primary resource of the webpage to be shown;The child resource of the webpage to be shown is loaded according to the TCP connections, waits to show described in formation
Show webpage.
The embodiments of the invention provide one kind to preload method, apparatus, equipment, and compared to prior art, user passes through clear
When device of looking at accesses webpage, in this section of free time that browser captures the primary resource of webpage and waits primary resource response, Ke Yigen
The child resource of webpage is actively captured according to the protocol responses data prestored and carries out TCP establishment of connections, it is not necessary to is being browsed
Child resource is captured again after device response primary resource, saves browser crawl child resource;And reduce and establish the time-consuming of TCP connections, from
And improve the opening speed of webpage.
Brief description of the drawings
Fig. 1 is a kind of schematic diagram of implementation environment involved by the embodiment of the present invention;
Fig. 2 is a kind of implementation process schematic diagram one of pre-add support method provided in an embodiment of the present invention;
Fig. 3 is a kind of implementation process schematic diagram two of pre-add support method provided in an embodiment of the present invention;
Fig. 4 is a kind of implementation process schematic diagram three of pre-add support method provided in an embodiment of the present invention;
Fig. 5 is a kind of implementation process schematic diagram four of pre-add support method provided in an embodiment of the present invention;
Fig. 6-1 is a kind of interaction schematic diagram one of pre-add support method provided in an embodiment of the present invention;
Fig. 6-2 is a kind of interaction schematic diagram two of pre-add support method provided in an embodiment of the present invention;
Fig. 7 is a kind of structural representation one of pre-load means provided in an embodiment of the present invention;
Fig. 8 is a kind of structural representation two of pre-load means provided in an embodiment of the present invention;
Fig. 9 is a kind of structural representation three of pre-load means provided in an embodiment of the present invention;
Figure 10 is a kind of structural representation of preload device provided in an embodiment of the present invention.
Embodiment
In order to solve problem present in background technology, the embodiment of the present invention provides a kind of pre-add support method, can applied
In being provided with browser, and the terminal of webpage can be browsed by browser, for example, computer, mobile phone, tablet personal computer etc..Fig. 1 is should
Method is applied to implementation environment schematic diagram during mobile phone, and the mobile phone is provided with browser, as shown in figure 1, the implementation environment bag
Include:Mobile phone 11 and the web page server 12 for being arranged on network side, mobile phone 11 pass through wireless network or wired with web page server 12
Network connection, web data can be sent to mobile phone 11 by web page server 12 according to the request of mobile phone 11, in order to mobile phone 11
The browser of installation shows the webpage browsed needed for user, the web data includes the webpage according to the web data
Primary resource and child resource.
The technical solution of the present invention is further elaborated with specific embodiment below in conjunction with the accompanying drawings.
The embodiment of the present invention provides a kind of pre-add support method, as shown in Fig. 2 methods described includes:
Step 201, to web page server access request is sent, the access request includes the domain name of webpage to be shown.
Exemplarily, when user need access webpage when, can open a terminal on browser, then on the ground of browser
The domain name of the webpage accessed needed for the input of location column simultaneously clicks on determination, and now web page server corresponding to browser to the webpage is sent out
Access request is sent, the domain name that webpage is accessed needed for user is carried in the access request, accessing webpage needed for the user is
The webpage to be shown of browser.
Or some pictures or word can be shown on the current page of usual browser, the picture or Text Link have time
The level page, when user desires access to the secondary page of these pictures or Text Link, can click on the picture or word, this
When web page server corresponding to browser to the secondary page send access request, carry the secondary in the access request
The domain name of the page, the secondary page are the webpage to be shown of browser.
Step 202, from local protocol responses data corresponding with domain name are obtained, the protocol responses data include institute
State the domain name list of at least one child resource of webpage to be shown;Established according to the domain name list of at least one child resource every
The TCP connections of the individual child resource.
Here, step S202 can wait the web page server to return to the webpage to be shown according to domain name
Performed during web data, because web page server can only send the primary resource of the webpage to be shown to terminal, and
Protocol responses data are not sent, so as to reduce the consumption of the flow of terminal;Assisted because terminal can not receive from web page server
Response data is discussed, so terminal during wait, can connect according to TCP is first established from the protocol responses data locally obtained
Connect, the time-consuming of TCP connections is established in this way, reducing, so as to improve the opening speed of webpage.
Exemplarily, after browser sends access request to web page server, wait the web page server according to
During domain name returns to the web data of the webpage to be shown, browser can continuously perform step 2021 and step
2022, the implementation procedure of step 2021 and step 2022 is detailed below.
Step 2021, browser inquire about the protocol responses data of webpage to be shown from the information being locally stored.
In the present embodiment, the protocol responses data can be stored in the caching of the browser, can also be stored in
In the memory for installing the terminal of browser, the embodiment of the present invention is not limited this.
During waiting the web page server to return to the web data of the webpage to be shown according to domain name,
Browser can obtain the protocol responses data from local cache or memory first.The protocol responses data include treating
The domain name list of at least one child resource of webpage is shown, the domain name list of each child resource includes domain name, protocol-identifier and end
Mouth mark.The child resource of webpage is usually the information such as picture or video, and these information are stored on different server in a network,
Communication protocol corresponding to different servers may be different, and the port numbers that different servers uses when being connected with browser also may be used
Can be different, therefore the domain name list of each child resource includes its corresponding domain name, protocol-identifier and port-mark, wherein,
Domain name, the address of the server for indicating storage child resource;The protocol-identifier, for indicating browser and storage
Communication protocol between the server of resource;The port-mark, for indicating that the terminal for installing the browser is sub with storing
Port numbers between the server of resource.
Exemplarily, the primary resource be in web data HTML (Hyper Text Markup Language, it is super
Text mark up language) file, the child resource be web data in addition to primary resource other any JS (JavaScript)/
The resources such as CSS (Cascading Style Sheets, CSS)/picture.
The domain name list for multiple child resources that step 2022, browser include according to protocol responses data is established the multiple
The TCP connections of each child resource in child resource.
Exemplarily, browser can be first to child resource domain name list carry out DNS (Domain Name System,
Domain name system) parsing, IP (Internet Protocol, procotol) address of the server of storage child resource is obtained, so
Protocol-identifier and port-mark according to corresponding to the child resource establish the IP address of the server of storage child resource with browsing afterwards
TCP connections between device.
Assuming that the protocol responses data of webpage to be shown include the domain name list of 3 child resources, when browser gets three
After the domain name list of individual child resource, the domain name list first to three child resources carries out dns resolution, obtains first respectively
The IP address of the server of child resource is stored, the IP address of the server of the second storage child resource and the 3rd store child resource
The IP address of server, wherein the IP address of the server of the first storage child resource is to store the server of the first child resource
IP address, the IP address of the IP address as server of the second child resource of storage of the server of the second storage child resource, the 3rd
The IP address for storing the server of child resource is the IP address for the server for storing the 3rd child resource, is then provided according to the first son
Protocol-identifier and port-mark in the domain name list in source, obtain logical between the server and browser that store the first child resource
Letter agreement and the port numbers to be communicated between the terminal of installation browser, establish according to the communication protocol and port numbers and deposit
Store up the TCP connections between the server and browser of the first child resource;Similarly can be according to the second child resource and the 3rd child resource
Domain name list in protocol-identifier and port-mark, respectively obtain storage the second child resource and the 3rd child resource server with
The port numbers to be communicated between communication protocol between browser and the terminal installing browser, and then establish storage the
Between the server and browser of the 3rd child resource of TCP connections and storage between the server and browser of two child resources
TCP connections.
Step 203, the web data for receiving the webpage to be shown that the web page server is sent, the web data
Include the primary resource of the webpage to be shown.
Exemplarily, after browser sends access request to web page server, web page server can ask according to accessing
The web data of domain Name acquisition webpage to be shown in asking, because the terminal storage for installing browser is described webpage to be shown
The protocol responses data of child resource, i.e. browser can need not obtain the son money of webpage to be shown at web page server again
The relevant information in source, the web data that now web page server is sent can only include the primary resource of webpage to be shown.
Or the web data that web page server is sent can also include retouching outside the primary resource including webpage to be shown
The protocol responses data of the child resource of webpage to be shown are stated, in order to which terminal or browser are carried out to the protocol responses data of storage
Renewal.
Step 204, the primary resource of the loading webpage to be shown simultaneously load the webpage to be shown according to the TCP connections
Child resource, form the webpage to be shown.
Exemplarily, after browser receives the primary resource of webpage to be shown, the primary resource of webpage to be shown is entered
Row loading, the framework of webpage to be shown is formed, according to the TCP of each child resource while the primary resource of webpage to be shown is loaded
Connection loading child resource, and the child resource being loaded into is filled in the framework of webpage to be shown, form webpage to be shown.
Assuming that webpage to be shown is video page, the page includes a main view frequency, and links other associated videos
Picture, the layout of whole video page are set by webpage to be shown for primary resource, the figure of the main view frequency and other associated videos
Piece is the child resource of webpage to be shown.Browser can load child resource simultaneously in the loading procedure to primary resource, will
The main view frequency of acquisition is loaded into the region of the main video playback of primary resource setting, and the picture of acquisition is loaded into primary resource setting
The viewing area of associated video picture.After browser is by primary resource and child resource loaded, complete video page is formed.
In other embodiments of the invention, the procotol of common webpage is HTTP (Hyper Text Transfer
Protocol, HTTP), under the communication protocol, TCP is established between browser and the server for storing child resource
After connection, you can loading child resource forms complete webpage.But the procotol of also some webpages is HTTPS (Hyper
Text Transfer Protocol over Secure Socket Layer, the Hyper text transfer association based on secure data layer
View), now established between the server of browser and storage child resource after TCP connections, it is also necessary to which browser is to every height
The TCP connections of resource carry out SSL (Secure Sockets Layer SSLs) and shaken hands, when the TCP of each child resource connects
When the SSL connect is shaken hands successfully, browser can load the primary resource of webpage to be shown and load net to be shown according to TCP connections
The child resource of page, ultimately form complete webpage to be shown;If exist TCP connections SSL shake hands unsuccessful child resource when, browser
The child resource can not be loaded, now region corresponding to the child resource is that blank or display loading are unsuccessful in webpage to be shown
Mark.
The embodiment of the present invention provides a kind of pre-add support method, as shown in figure 3, methods described includes:
Step 301, to web page server access request is sent, the access request includes the domain name of webpage to be shown, hold
Row step 302.
Exemplarily, after browser sends access request to web page server, wait the web page server according to
During domain name returns to the web data of the webpage to be shown, browser can continuously perform step 302 to step
304, step 302 is detailed below to the implementation procedure of step 304.
Step 302, from local protocol responses data corresponding with domain name are obtained, the protocol responses data include institute
Domain name list and the time threshold of at least one child resource of webpage to be shown are stated, performs step 303.
In the present embodiment, the protocol responses data can be stored in the caching of the browser, can also be stored in
In the memory for installing the terminal of browser, the embodiment of the present invention is not limited this.
During waiting the web page server to return to the web data of the webpage to be shown according to domain name,
Browser can obtain the protocol responses data from local cache or memory first.The protocol responses data include treating
Domain name list and the time threshold of at least one child resource of webpage are shown, the domain name list of each child resource includes domain name, association
Assess a bid for tender knowledge and port-mark, the time threshold be used for indicate the protocol responses data the terminal storage it is most long when
Limit.
Step 303, determine whether the storage duration of the protocol responses data is less than or equal to time threshold;It is if described
The storage duration of protocol responses data is less than or equal to time threshold, performs step 304;If the protocol responses data are deposited
Storage duration is more than time threshold, performs step 305.
In practical application, each webpage is not unalterable, and keeper periodically can be updated to webpage, changes net
Mistake on page, or the content more in new web page, therefore the end side protocol responses data that preserve may be current with webpage
Primary resource simultaneously mismatches, now if child resource corresponding to the protocol responses data that terminal is preserved is filled in the current master of webpage
In resource, it is possible that the situation that web displaying is incomplete or wrong, influences the viewing of user.
In order to avoid the above situation, the protocol responses data also include being used to indicate to store most long time limit time threshold,
The time threshold can be same with the cycle phase of keeper's more new web page.Browser gets the protocol responses data locally preserved
Afterwards, it can determine whether the storage duration of the protocol responses data is less than or equal to time threshold first.If agreement is rung
Answer data to be more than the time threshold in the storage duration of terminal, illustrate that now keeper may have updated web data,
The protocol responses data failure of terminal storage;If protocol responses data are less than or equal to the time in the storage duration of terminal
Threshold value, illustrate within the terminal storage period of the protocol responses data to current time, keeper is not to web data
Modify, the protocol responses data that terminal preserves are still effective.
If the storage duration of step 304, the protocol responses data is less than or equal to the time threshold, according to described
The TCP connections of each child resource are established in the domain name list of at least one child resource, perform step 307.
Exemplarily, if the storage duration of the protocol responses data is less than or equal to the time threshold, illustrate to work as
The protocol responses data of preceding terminal local storage are still effective, can obtain multiple child resources that the protocol responses data include
Domain name list, and establish the TCP connections of each child resource.
Specifically, the domain name list that browser can be first to child resource carries out dns resolution, obtains storing the clothes of child resource
The IP address of business device, then protocol-identifier and port-mark establish the server of storage child resource according to corresponding to the child resource
IP address and browser between TCP connections.
If the storage duration of step 305, the protocol responses data is more than the time threshold, the webpage clothes are received
The web data for the webpage to be shown that business device is sent, the web data include primary resource and the association of the webpage to be shown
Response data is discussed, performs step 306.
Exemplarily, if the protocol responses data that terminal local preserves are more than the time threshold in the storage duration of terminal
Value, illustrates that now keeper may have updated web data, the protocol responses data failure of terminal storage, browser can not
Child resource corresponding to the protocol responses data locally preserved is loaded to form webpage to be shown, can now wait the net to be received
The web data for the webpage to be shown that page server is sent, and obtain the agreement in the web data of web page server transmission
Response data, the protocol responses data are protocol responses data newest after webpage updates, and are matched with the primary resource of current web page.
Step 306, the primary resource of webpage to be shown described in the web data received and protocol responses number are obtained respectively
According to, and the TCP companies of each child resource are established in the domain name list of the multiple child resources included according to the protocol responses data
Connect, perform step 307.
Step 307, the primary resource of the loading webpage to be shown simultaneously load the webpage to be shown according to the TCP connections
Child resource, form the webpage to be shown.
Exemplarily, after browser receives the primary resource of webpage to be shown, the primary resource of webpage to be shown is entered
Row loading, the framework of webpage to be shown is formed, according to the TCP of each child resource while the primary resource of webpage to be shown is loaded
Connection loading child resource, and the child resource being loaded into is filled in the framework of webpage to be shown, form webpage to be shown.
In other embodiments of the invention, if the procotol of webpage is HTTPS, in browser and storage child resource
Established between server after TCP connections, it is also necessary to which TCP connection of the browser to each child resource carries out SSL and shaken hands, when each
When the SSL of the TCP connections of child resource is shaken hands successfully, browser can load the primary resource of webpage to be shown and be connected according to TCP
The child resource for loading webpage to be shown is connect, ultimately forms complete webpage to be shown.
The embodiment of the present invention provides a kind of pre-add support method, as shown in figure 4, methods described includes:
Step 401, to web page server access request is sent, the access request includes the domain name of webpage to be shown, hold
Row step 402.
Exemplarily, after browser sends access request to web page server, wait the web page server according to
During domain name returns to the web data of the webpage to be shown, browser can continuously perform step 402 to step
404, step 402 is detailed below to the implementation procedure of step 404.
Step 402, from local protocol responses data corresponding with domain name are obtained, the protocol responses data include institute
Domain name list and the time threshold of at least one child resource of webpage to be shown are stated, performs step 403.
Step 403, determine whether the storage duration of the protocol responses data is less than or equal to time threshold;It is if described
The storage duration of protocol responses data is less than or equal to time threshold, performs step 404;If the protocol responses data are deposited
Storage duration is more than time threshold, performs step 405.
In practical application, each webpage is not unalterable, and keeper periodically can be updated to webpage, changes net
Mistake on page, or the content more in new web page, therefore, the protocol responses data can also include being used to indicate storage most
Long time limit time threshold, the time threshold can be identical with the update cycle of keeper's more new web page.Browser gets this
After the protocol responses data that ground preserves, it can determine whether the storage duration of the protocol responses data is less than or equal to first
Time threshold.
If the storage duration of step 404, the protocol responses data is less than or equal to the time threshold, according to described
The TCP connections of each child resource are established in the domain name list of at least one child resource, perform step 407.
Exemplarily, if the storage duration of the protocol responses data is less than or equal to the time threshold, illustrate
In the terminal storage protocol responses data to the period of current time, keeper does not modify to web data, eventually
Hold the protocol responses data being locally stored still effective, the domain name for multiple child resources that the protocol responses data include can be obtained
List, and establish the TCP connections of each child resource.
Specifically, the domain name list that browser can be first to child resource carries out dns resolution, obtains storing the clothes of child resource
The IP address of business device, then protocol-identifier and port-mark establish the server of storage child resource according to corresponding to the child resource
IP address and browser between TCP connections.
If the storage duration of step 405, the protocol responses data is more than the time threshold, the webpage clothes are received
The web data for the webpage to be shown that business device is sent, performs step 406.
Exemplarily, if the protocol responses data that terminal local preserves are more than the time threshold in the storage duration of terminal
Value, illustrates that now keeper may have updated web data, the protocol responses data failure of terminal storage, browser can not
Child resource corresponding to the protocol responses data locally preserved is loaded to form webpage to be shown, can now wait the net to be received
The web data for the webpage to be shown that page server is sent, and obtain the agreement in the web data of web page server transmission
Response data, the protocol responses data are protocol responses data newest after webpage updates, and are matched with the primary resource of current web page.
The protocol responses data of the webpage to be shown in the web data that step 406, basis receive, renewal
The protocol responses data locally preserved and the TCP companies that each child resource is established according to the protocol responses data after renewal
Connect, perform step 407.
Exemplarily, after getting newest protocol responses data, newest protocol responses data can be used, that is, are connect
The protocol responses data of the webpage to be shown in the web data received, update the protocol responses locally preserved
Data, the protocol responses data and the primary resource of webpage that terminal local preserves when accessing the webpage next time to enable
Match somebody with somebody, save the time that browser loads the webpage.
After the completion of renewal, the domain name row for multiple child resources that browser can include according to the protocol responses data after renewal
Table, the TCP connections of each child resource are established, in order to form the webpage to be shown.
Step 407, the primary resource of the loading webpage to be shown simultaneously load the webpage to be shown according to the TCP connections
Child resource, form the webpage to be shown.
Exemplarily, browser loads to the primary resource of webpage to be shown, forms the framework of webpage to be shown, is adding
Child resource is loaded according to the TCP connections of each child resource while carrying the primary resource of webpage to be shown, and the son being loaded into is provided
Source is filled in the framework of webpage to be shown, forms webpage to be shown.
In other embodiments of the invention, if the procotol of webpage is HTTPS, in browser and storage child resource
Established between server after TCP connections, it is also necessary to which TCP connection of the browser to each child resource carries out SSL and shaken hands, when each
When the SSL of the TCP connections of child resource is shaken hands successfully, browser can load the primary resource of webpage to be shown and be connected according to TCP
The child resource for loading webpage to be shown is connect, ultimately forms complete webpage to be shown.
The embodiment of the present invention provides a kind of pre-add support method, as shown in figure 5, methods described includes:
Step 501, to web page server access request is sent, the access request includes the domain name of webpage to be shown, hold
Row step 502.
Exemplarily, after browser sends access request to web page server, wait the web page server according to
During domain name returns to the web data of the webpage to be shown, browser can continuously perform step 502 to step
504, step 502 is detailed below to the implementation procedure of step 504.
Step 502, from local protocol responses data corresponding with domain name are obtained, the protocol responses data include institute
Domain name list and the time threshold of at least one child resource of webpage to be shown are stated, performs step 503.
Step 503, determine whether the storage duration of the protocol responses data is less than or equal to time threshold;It is if described
The storage duration of protocol responses data is less than or equal to time threshold, performs step 504;If the protocol responses data are deposited
Storage duration is more than time threshold, performs step 505.
In practical application, each webpage is not unalterable, and keeper periodically can be updated to webpage, changes net
Mistake on page, or the content more in new web page, therefore, the protocol responses data can also include being used to indicate storage most
Long time limit time threshold, the time threshold can be same with the cycle phase of keeper's more new web page.Browser gets local guarantor
After the protocol responses data deposited, it can determine whether the storage duration of the protocol responses data is less than or equal to the time first
Threshold value.
If the storage duration of step 504, the protocol responses data is less than or equal to the time threshold, according to described
The TCP connections of each child resource are established in the domain name list of at least one child resource, perform step 509.
Exemplarily, if the storage duration of the protocol responses data is less than or equal to the time threshold, illustrate
In the terminal storage protocol responses data to the period of current time, keeper does not modify to web data, eventually
Hold the protocol responses data being locally stored still effective, the domain name for multiple child resources that the protocol responses data include can be obtained
List, and establish the TCP connections of each child resource.
Specifically, the domain name list that browser can be first to child resource carries out dns resolution, obtains storing the clothes of child resource
The IP address of business device, then protocol-identifier and port-mark establish the server of storage child resource according to corresponding to the child resource
IP address and browser between TCP connections.
If the storage duration of step 505, the protocol responses data is more than the time threshold, the webpage clothes are received
The web data for the webpage to be shown that business device is sent, performs step 506.
Exemplarily, if the protocol responses data that terminal local preserves are more than the time threshold in the storage duration of terminal
Value, illustrates that now keeper may have updated web data, the protocol responses data failure of terminal storage, it is impossible to which loading is originally
Child resource corresponding to the protocol responses data that ground preserves forms webpage to be shown, can now wait the web service to be received
The web data for the webpage to be shown that device is sent, and obtain the protocol responses number in the web data of web page server transmission
According to the protocol responses data are protocol responses data newest after renewal, are matched with the primary resource of current web page.
Step 506, determine protocol responses data and the protocol responses number locally preserved that the web data includes
According to whether identical;If the protocol responses data that the web data includes and the protocol responses data phase locally preserved
Together, step 508 is performed;If the protocol responses data that the web data includes and the protocol responses data locally preserved
Difference, perform step 507.
Exemplarily, terminal preserve protocol responses data whether effectively by terminal preserve protocol responses data storage
Duration determines that, if the storage duration has exceeded time threshold, the protocol responses data failure that terminal thinks locally to preserve is, it is necessary to enter
Row renewal;If the storage duration, in time threshold, terminal thinks that the protocol responses data that locally preserve are effective, it is not necessary to carries out
Renewal.But keeper is not that each update cycle webpage can be updated, if keeper is in the current update cycle
Web data is not updated, then the protocol responses data in the web data that terminal receives and the agreement locally preserved
Response data is identical, need not can now be updated.In order to avoid terminal replaces this using identical protocol responses data
The protocol responses data that ground preserves, cause the waste of process resource, before the update, browser can also determine the web data
Including protocol responses data and the protocol responses data locally preserved it is whether identical.
If the protocol responses data that step 507, the web data include and the protocol responses number locally preserved
According to difference, the protocol responses data included according to the web data, the protocol responses data locally preserved and root are updated
The TCP connections of each child resource are established according to the protocol responses data after renewal, perform step 509.
Exemplarily, if the protocol responses data that include of web data with the protocol responses data locally preserved not
Together, illustrate that keeper was modified and updated to web data really within this update cycle, now terminal can basis
The protocol responses data that the web data includes, the protocol responses data locally preserved are updated, to visit next time
The protocol responses data that terminal local preserves when asking the webpage can match with the primary resource of webpage, save browser and load the net
The time of page.
After the completion of renewal, the domain name row for multiple child resources that browser can include according to the protocol responses data after renewal
Table, the TCP connections of each child resource are established, in order to form the webpage to be shown.
If the protocol responses data that step 508, the web data include and the protocol responses number locally preserved
According to identical, the timer of renewal record storage duration and the TCP connections for establishing each child resource, execution step 509.
Exemplarily, if the protocol responses data that include of the web data and the protocol responses number locally preserved
According to identical, illustrate that keeper did not modified and updated to web data within this update cycle, now terminal does not update this
The protocol responses data that ground preserves, but the timer of protocol responses time data memory described in more new record, by the timing
Device is reset, in order to record the storage time of the protocol responses data again.After timer is reset, browser can basis
The domain name list for multiple child resources that the protocol responses data locally preserved include, the TCP connections of each child resource are established, so as to
In the formation webpage to be shown.
Step 509, the primary resource of the loading webpage to be shown simultaneously load the webpage to be shown according to the TCP connections
Child resource, form the webpage to be shown.
Exemplarily, browser loads to the primary resource of webpage to be shown, forms the framework of webpage to be shown, is adding
Child resource is loaded according to the TCP connections of each child resource while carrying the primary resource of webpage to be shown, and the son being loaded into is provided
Source is filled in the framework of webpage to be shown, forms webpage to be shown.
In other embodiments of the invention, if the procotol of webpage is HTTPS, in browser and storage child resource
Established between server after TCP connections, it is also necessary to which TCP connection of the browser to each child resource carries out SSL and shaken hands, when each
When the SSL of the TCP connections of child resource is shaken hands successfully, browser can load the primary resource of webpage to be shown and be connected according to TCP
The child resource for loading webpage to be shown is connect, ultimately forms complete webpage to be shown.
The embodiment of the present invention provides a kind of pre-add support method, applied to web page server and the terminal for being provided with browser,
The browser can be used as executive agent to complete the pre-add support method as client independent operating and the terminal
Each step being related to, the pre-add support method interacted between browser and web page server is described in detail below.Such as
Shown in Fig. 6-1, methods described includes:
Step 601, browser send access request to the web page server, and the access request includes webpage to be shown
Domain name, perform step 602.
Exemplarily, when the browser on user can open a terminal, accessed needed for the address field input in browser
The domain name of webpage simultaneously clicks on determination, and now web page server corresponding to browser to the webpage sends access request, the visit
The domain name for being carried in request and webpage being accessed needed for user is asked, the net to be shown that webpage is browser is accessed needed for the user
Page.For example, when user desires access to Netease's news, " http can be inputted in the address field of browser://
News.163.com/ ", then click on and determine, browser can be sent to the web page server of Netease's news includes domain name
“http://news.163.com/ " access request.
Or when user desires access to the secondary page of the picture that current page shows or Text Link, it can click on
The picture or word, now web page server transmission access request, the access corresponding to browser to the secondary page
The domain name of the secondary page is carried in request, the secondary page is the webpage to be shown of browser.For example, it is assumed that Netease
The picture of an environmental pollution, one secondary net for being related to environmental pollution news of the image link are shown on the page of news
Page, the domain name of the secondary page is " http://news.163.com/16/0708/10/BREQAAVU00014JB6.html ",
When user desires access to the secondary page, the picture can be clicked on, now browser can be to the web page server of Netease's news
Transmission includes domain name " http://news.163.com/16/0708/10/BREQAAVU00014JB6.html " access request.
Step 602, web page server are according to the domain name of the webpage to be shown, the webpage number of the acquisition webpage to be shown
According to the web data includes the primary resource of the webpage to be shown and the protocol responses data, the protocol responses
Data include domain name list and the time threshold of at least one child resource of the webpage to be shown, perform step 603.
Exemplarily, can be according to access request after web page server receives the access request of browser transmission
In domain Name acquisition webpage to be shown web data, the primary resource that the web data includes can be http response data,
Protocol responses data can be http response head.
In other embodiments of the invention, web page server is returning to http response data corresponding to webpage to be shown
When, x-pre-connect heads can be actively set, and the x-pre-connect is the customized HTTP of the embodiment of the present invention
Head response, for delivery protocol response data, the form of the x-pre-connect is as follows:
x-pre-connect:Max-age=expireTime;[scheme://]domain[:port][,
[scheme://]domain[:port]];
Wherein, the max-age is time threshold, and unit is the second, for instruction terminal storage x-pre-connect most
The long time limit;[the scheme://]domain[:Port] represent the domain name list of a child resource, different child resource domain names
CSV is used between list, the x-pre-connect comprises at least the domain name list of a child resource;Each domain name list
[scheme://]domain[:Port] in the scheme be protocol-identifier, for indicating browser with storing child resource
Communication protocol between server, such as scheme can be HTTP or HTTPS, if without scheme in x-pre-connect
When, it is HTTP to give tacit consent to its communication protocol;The domain is domain name, the address of the server of instruction storage child resource;It is described
Port is port-mark, for indicating to install the port numbers between the terminal of the browser and the server of storage child resource,
If scheme is HTTP, its port numbers is defaulted as 80, if scheme is HTTPS, its port numbers is fixed as 443.
Step 603, web page server send the web data to browser, perform step 604.
Exemplarily, customized x-pre-connect heads are arranged to http response head by web page server, then will
The http response data being provided with are sent to browser, in order to which browser forms net to be shown according to the http response data
Page.
Step 604, browser obtain protocol responses data that the web data includes and described being locally stored
Protocol responses data, perform step 605.
Exemplarily, browser obtains x-pre- after the http response data of web page server transmission are received
Connect heads, and the x-pre-connect heads are stored in local according to the domain name of the webpage to be shown, so as to
When browser accesses the webpage to be shown again, it can be looked into according to the domain name of the webpage to be shown from the information being locally stored
X-pre-connect heads corresponding to the webpage to be shown are ask, while timer is being locally located, by the x-pre-
Max-age in connect is arranged to the maximum of the timer.
It should be noted that the x-pre-connect can be stored in the caching of the browser, can also store
In the memory of the terminal of installation browser, the present invention implements to illustrate exemplified by the caching for being stored in browser.
Step 605, browser send access request to web page server again, and the access request includes webpage to be shown
Domain name, perform step 606.
Exemplarily, when user needs to access the webpage to be shown again, browser can be again to web page server
Send access request.
Step 606, waiting web data of the web page server according to the domain name return webpage to be shown
During, browser obtains protocol responses data corresponding with domain name from local, performs step 607.
Exemplarily, web data of the web page server according to the domain name return webpage to be shown is being waited
During, browser can be inquired about with the domain name of webpage to be shown according to the domain name of webpage to be shown in local cache first
The x-pre-connect of storage, the x-pre-connect are the protocol responses data of webpage to be shown.
Step 607, browser determine whether the storage duration of the protocol responses data is less than or equal to time threshold;Such as
The storage duration of protocol responses data described in fruit is less than or equal to time threshold, performs step 608;If the protocol responses number
According to storage duration be more than time threshold, perform step 609.
In practical application, each webpage is not unalterable, and keeper periodically can be updated to webpage, changes net
Mistake on page, or the content more in new web page, therefore the end side protocol responses data that preserve may be current with webpage
Primary resource simultaneously mismatches, now if child resource corresponding to the protocol responses data that terminal is preserved is filled in the current master of webpage
In resource, it is possible that the situation that web displaying is incomplete or wrong, influences the viewing of user.
In order to avoid the above situation, browser gets the x-pre-connect of the webpage to be shown locally preserved
Afterwards, it can determine whether the storage duration of the x-pre-connect is less than or equal in the x-pre-connect first
Max-age, specifically, the timer that can be set by terminal local are determined.If x-pre-connect is in the storage of terminal
Duration is more than the max-age, illustrates that now keeper may have updated web data, the x-pre- of terminal storage
Connect fails;If x-pre-connect is less than or equal to the max-age in the storage duration of terminal, illustrate in terminal
The x-pre-connect is stored in the period of current time, keeper is not modified to web data, and terminal is protected
The x-pre-connect deposited is still effective.
If the storage duration of step 608, the protocol responses data is less than or equal to the time threshold, browser root
The TCP connections of each child resource are established according to the domain name list of at least one child resource, perform step 611.
Exemplarily, if x-pre-connect storage durations are less than or equal to the max-age, browser can obtain
Take the domain name list [scheme for multiple child resources that the x-pre-connect includes://]domain[:Port], and establish every
The TCP connections of individual child resource.
Specifically, the domain name list [scheme that browser can be first to child resource://]domain[:Port] carry out
Dns resolution, obtain the domain name list [scheme of the child resource://]domain[:Port] in domain corresponding to IP
Location, then the domain name list [scheme according to corresponding to the child resource://]domain[:Port] in scheme and port build
TCP connections between the IP address and browser of the server of vertical storage child resource.
If the storage duration of step 609, the protocol responses data is more than the time threshold, described in browser receives
The web data for the webpage to be shown that web page server is sent, perform step 610.
Exemplarily, if the x-pre-connect that terminal local preserves is more than the max- in the storage duration of terminal
Age, illustrate that now keeper may have updated web data, the x-pre-connect failures of terminal storage, browser is not
Can the loading x-pre-connect that locally preserves form webpage to be shown, can now wait the web page server to be received
The web data of the webpage to be shown sent again and the http response data for obtaining web page server transmission, and obtain
X-pre-connect in http response data, the x-pre-connect are x-pre-connect newest after webpage updates,
Matched with the primary resource of current web page.
, can be again according to the domain in access request after web page server receives the access request of browser transmission again
Name obtains the web data of webpage to be shown, and the web data is sent into browser.
The protocol responses number of the webpage to be shown of step 610, browser in the web data received
According to the renewal protocol responses data locally preserved simultaneously establish each child resource according to the protocol responses data after renewal
TCP connections, perform step 611.
Exemplarily, after getting newest x-pre-connect, newest x-pre-connect can be used more
The x-pre-connect that new terminal locally preserves, terminal local is protected during causing browser access webpage to be shown next time
The x-pre-connect deposited can match with the primary resource of webpage, save the time that browser loads the webpage.
After the completion of renewal, browser can be according to the domain name for multiple child resources that the x-pre-connect after renewal includes
List [scheme://]domain[:Port], establish the TCP connections of each child resource.
Step 611, browser load the primary resource of the webpage to be shown and wait to show according to TCP connections loading
Show the child resource of webpage, form the webpage to be shown.
Exemplarily, browser loads to the primary resource of webpage to be shown, forms the framework of webpage to be shown, is adding
Child resource is loaded according to the TCP connections of each child resource while carrying the primary resource of webpage to be shown, and the son being loaded into is provided
Source is filled in the framework of webpage to be shown, forms webpage to be shown.
In other embodiments of the invention, if the procotol of webpage is HTTPS, in browser and storage child resource
Established between server after TCP connections, it is also necessary to which TCP connection of the browser to each child resource carries out SSL and shaken hands, when each
When the SSL of the TCP connections of child resource is shaken hands successfully, browser can load the primary resource of webpage to be shown and be connected according to TCP
The child resource for loading webpage to be shown is connect, ultimately forms complete webpage to be shown.
The embodiment of the present invention can also be applied between browser and web server, it is necessary to which both sides support to give birth to simultaneously
Effect.The protocol data that the embodiment of the present invention is transmitted between web server and browser relies on self-defined http response head x-
pre-connect.The form of the x-pre-connect is as follows:
x-pre-connect:Max-age=expireTime;[scheme://]domain[:port][,
[scheme://]domain[:Port]], [scheme://]domain[:Port] one child resource of mark domain name row
Table.
Specifically, as in fig. 6-2, http is accessed with user:Illustrated exemplified by //example.com, wherein, it is described
Domain name list [scheme in x-pre-connect://]domain[:Port] replaced by a.example.com:
Step 6A, user accesses http://example.com, i.e. user are in browser address bar input address or point
The connection hit on the page.
Step 6B, request is sent to web server by browser.
Step 6C, web server sets the head response of http response when returning to http response data corresponding to primary resource
It is set to x-pre-connect.
Step 6D, browser obtains x-pre-connect, and caches the x-pre- by mark of example.com
connect。
Step 6E, the domain name list a.example.com in browser resolves x-pre-connect, and establish TCP companies
Connect.
Step 6F, browser loads webpage http according to the TCP connections://example.com child resource, being formed should
Webpage, and shown.
Step 6H, user accesses http again://example.com webpages.
Step 6I, browser first initiates primary resource request, and postpones deposit inner taking-up domain corresponding to x-pre-connect immediately
List of file names.
If step 6J, domain name list is not out of date, browser is to the domain name list in x-pre-connect
A.example.com carries out dns resolution, and establishes TCP connections.If procotol is HTTPS, it is also necessary to carries out ssl and shakes hands.
Step 6K, browser receives primary resource and loaded.
Step 6L, browser loads webpage http according to the TCP connections://example.com child resource, being formed should
Webpage, and shown.
So, when user accesses a.example.com webpages again, browser is in crawl primary resource and waits
Domain name list in this section of free time of primary resource response in can active obtaining x-pre-connect
A.example.com, dns resolution and the TCP pre-connections of child resource are carried out, and without that could be carried out after primary resource response
Dns resolution and TCP pre-connections, save child resource domain name mapping and the time-consuming of foundation is connected with TCP, improve page open speed
Degree.
The embodiment of the present invention provides a kind of pre-load means 70, as shown in fig. 7, described device 70 includes:
Transmitting element 701, for sending access request to web page server, the access request includes webpage to be shown
Domain name.
Unit 702 is established, for waiting the web page server to return to the webpage to be shown according to domain name
During web data, protocol responses data corresponding with domain name are obtained from local, the protocol responses data include
The domain name list of at least one child resource of the webpage to be shown;And built according to the domain name list of at least one child resource
The transmission control protocol TCP connection of vertical each child resource.
Receiving unit 703, the web data of the webpage to be shown sent for receiving the web page server are described
Web data includes the primary resource of the webpage to be shown.
Loading unit 703, for loading the primary resource of the webpage to be shown and being treated according to TCP connections loading
The child resource of webpage is shown, forms the webpage to be shown.
So, when user is by browser access webpage, the primary resource and wait primary resource of browser crawl webpage
In this section of free time of response, child resource and the progress of webpage can be actively captured according to the protocol responses data prestored
TCP establishment of connections, it is not necessary to capture child resource again after browser responds primary resource, save browser crawl child resource;
And reduce and establish the time-consuming of TCP connections, improve the opening speed of webpage.
In other embodiments of the invention, the protocol responses data also include time threshold;It is as shown in figure 8, described
Device 70 also includes:
Determining unit 704, for determining whether the storage duration of the protocol responses data is less than or equal to time threshold;
If it is described establish unit 702 specifically for the protocol responses data storage duration be less than or equal to it is described when
Between threshold value, the TCP connections of each child resource are established according to the domain name list of at least one child resource.
In other embodiments of the invention, the web data also includes the protocol responses number of the webpage to be shown
According to;As shown in figure 9, described device 70 also includes:
Updating block 705, if the storage duration for the protocol responses data is more than the time threshold, according to connecing
The protocol responses data of the webpage to be shown in the web data received, update the protocol responses locally preserved
Data.
In other embodiments of the invention, the domain name list of each child resource includes domain name, protocol-identifier and end
Mouth mark;The unit 702 of establishing is specifically used for:Domain name list to child resource carries out domain name system DNS parsing, obtains described
Network protocol IP address corresponding to the domain name of child resource;Established and deposited according to protocol-identifier corresponding to the child resource and port-mark
Store up the TCP connections between the IP address of the server of child resource and browser.
The embodiment of the present invention provides a kind of preload device 100, and as shown in Figure 10, the equipment 100 includes communication interface
1001 and processor 1002:
Wherein described processor 1002, for sending access request to web page server by the communication interface 1001,
The access request includes the domain name of webpage to be shown;Wait to show according to returning to domain name waiting the web page server
During the web data for showing webpage, protocol responses data corresponding with domain name, the protocol responses are obtained from local
Data include the domain name list of at least one child resource of the webpage to be shown;And according to the domain of at least one child resource
List of file names establishes the transmission control protocol TCP connection of each child resource;The net is received by the communication interface 1001
The web data for the webpage to be shown that page server is sent, the web data include the main money of the webpage to be shown
Source;Load the primary resource of the webpage to be shown and the child resource of the webpage to be shown is loaded according to the TCP connections, formed
The webpage to be shown.
So, when user is by browser access webpage, the primary resource and wait primary resource of browser crawl webpage
In this section of free time of response, child resource and the progress of webpage can be actively captured according to the protocol responses data prestored
TCP establishment of connections, it is not necessary to capture child resource again after browser responds primary resource, save browser crawl child resource;
And reduce and establish the time-consuming of TCP connections, improve the opening speed of webpage.
In other embodiments of the invention, the protocol responses data also include time threshold;The processor 1002
For:Determine whether the storage duration of the protocol responses data is less than or equal to time threshold;If the protocol responses number
According to storage duration be less than or equal to the time threshold, each institute is established according to the domain name list of at least one child resource
State the TCP connections of child resource.
In other embodiments of the invention, the web data also includes the protocol responses number of the webpage to be shown
According to;The processor 1002 is used for:If the storage duration of the protocol responses data is more than the time threshold, according to reception
To the web data in the webpage to be shown protocol responses data, update the protocol responses number locally preserved
According to.
In other embodiments of the invention, the domain name list of each child resource includes domain name, protocol-identifier and end
Mouth mark;The processor 1002 is used for:Domain name list to child resource carries out domain name system DNS parsing, obtains the sub- money
Network protocol IP address corresponding to the domain name in source;Storage is established according to protocol-identifier corresponding to the child resource and port-mark
TCP connections between the IP address and browser of the server of resource.
It need to be noted that be:The description of above apparatus embodiments item, it is similar with above method description, has same
Embodiment of the method identical beneficial effect, therefore do not repeat.For the ins and outs not disclosed in present device embodiment,
Those skilled in the art refer to the description of the inventive method embodiment and understand, to save length, repeat no more here.
It should be understood that " one embodiment " or " embodiment " that specification is mentioned in the whole text mean it is relevant with embodiment
During special characteristic, structure or characteristic are included at least one embodiment of the present invention.Therefore, occur everywhere in entire disclosure
" in one embodiment " or " in one embodiment " identical embodiment is not necessarily referred to.In addition, these specific feature, knots
Structure or characteristic can combine in one or more embodiments in any suitable manner.It should be understood that in the various implementations of the present invention
In example, the size of the sequence number of above-mentioned each process is not meant to the priority of execution sequence, and the execution sequence of each process should be with its work(
It can be determined with internal logic, the implementation process without tackling the embodiment of the present invention forms any restriction.The embodiments of the present invention
Sequence number is for illustration only, does not represent the quality of embodiment.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row
His property includes, so that process, method, article or device including a series of elements not only include those key elements, and
And also include the other element being not expressly set out, or also include for this process, method, article or device institute inherently
Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this
Other identical element also be present in the process of key element, method, article or device.
In several embodiments provided herein, it should be understood that disclosed apparatus and method, it can be passed through
Its mode is realized.Apparatus embodiments described above are only schematical, for example, the division of the unit, is only
A kind of division of logic function, there can be other dividing mode when actually realizing, such as:Multiple units or component can combine, or
Another system is desirably integrated into, or some features can be ignored, or do not perform.In addition, shown or discussed each composition portion
Point mutual coupling or direct-coupling or communication connection can be the INDIRECT COUPLINGs by some interfaces, equipment or unit
Or communication connection, can be electrical, mechanical or other forms.
The above-mentioned unit illustrated as separating component can be or may not be physically separate, show as unit
The part shown can be or may not be physical location;Both a place can be located at, multiple network lists can also be distributed to
In member;Partly or entirely unit therein can be selected to realize the purpose of this embodiment scheme according to the actual needs.In addition,
Each functional unit in various embodiments of the present invention can be fully integrated into a processing unit or each unit difference
Separately as a unit, can also two or more units it is integrated in a unit;Above-mentioned integrated unit both may be used
Realize, can also be realized in the form of hardware adds SFU software functional unit in the form of using hardware.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above method embodiment can pass through
Programmed instruction related hardware is completed, and foregoing program can be stored in computer read/write memory medium, and the program exists
During execution, execution the step of including above method embodiment;And foregoing storage medium includes:Movable storage device, read-only deposit
Reservoir (Read Only Memory, ROM), magnetic disc or CD etc. are various can be with the medium of store program codes.Or this hair
If bright above-mentioned integrated unit is realized in the form of software function module and as independent production marketing or in use, also may be used
To be stored in a computer read/write memory medium.Based on such understanding, the technical scheme essence of the embodiment of the present invention
On the part that is contributed in other words to prior art can be embodied in the form of software product, the computer software product
Be stored in a storage medium, including some instructions to cause a computer equipment (can be personal computer, service
Device or the network equipment etc.) perform all or part of each embodiment methods described of the present invention.And foregoing storage medium bag
Include:Movable storage device, ROM, magnetic disc or CD etc. are various can be with the medium of store program codes.
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited thereto, any
Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all be contained
Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.
Claims (10)
- A kind of 1. pre-add support method, it is characterised in that including:Access request is sent to web page server, the access request includes the domain name of webpage to be shown;Protocol responses data corresponding with domain name are obtained from local, the protocol responses data include the webpage to be shown At least one child resource domain name list;The transmission control protocol TCP that each child resource is established according to the domain name list of at least one child resource connects;The web data for the webpage to be shown that the web page server is sent is received, the web data is waited to show including described Show the primary resource of webpage;Load the primary resource of the webpage to be shown;The child resource of the webpage to be shown is loaded according to the TCP connections, forms the webpage to be shown.
- 2. according to the method for claim 1, it is characterised in that the protocol responses data also include time threshold;It is described Method also includes:Determine whether the storage duration of the protocol responses data is less than or equal to time threshold;If the storage duration of the protocol responses data is less than or equal to the time threshold, according at least one sub- money The TCP connections of each child resource are established in the domain name list in source.
- 3. according to the method for claim 2, it is characterised in that the web data also includes the association of the webpage to be shown Discuss response data;Methods described also includes:If the storage duration of the protocol responses data is more than the time threshold, according in the web data received The webpage to be shown protocol responses data, update the protocol responses data locally preserved.
- 4. according to the method for claim 1, it is characterised in that the web data also includes the association of the webpage to be shown Discuss response data;Methods described also includes:Determine whether protocol responses data that the web data includes and the protocol responses data locally preserved are identical;If the protocol responses data that the web data includes are different from the protocol responses data locally preserved, according to institute The protocol responses data that web data includes are stated, update the protocol responses data locally preserved.
- 5. according to the method described in Claims 1-4 any one claim, it is characterised in that methods described also includes:Access request is sent to the web page server, the access request includes the domain name of webpage to be shown;The web data for the webpage to be shown that the web page server is sent is received, the web data is waited to show including described Show the primary resource of webpage and the protocol responses data;The protocol responses data that the web data includes are obtained, the protocol responses data are being locally stored.
- 6. according to the method described in Claims 1-4 any one claim, it is characterised in that methods described also includes:TCP connections to each child resource carry out SSL SSL and shaken hands;The success if SSL of the TCP connections of each child resource shakes hands, the primary resource of the webpage to be shown is loaded, according to described TCP connections load the child resource of the webpage to be shown, form the webpage to be shown.
- 7. according to the method described in Claims 1-4 any one claim, it is characterised in that each child resource Domain name list includes domain name, protocol-identifier and port-mark;The TCP connections that each child resource is established according to the domain name list of at least one child resource include:Domain name list to child resource carries out domain name system DNS parsing, obtains procotol corresponding to the domain name of the child resource IP address;According to protocol-identifier corresponding to the child resource and port-mark establish the IP address of the server of storage child resource with it is clear The TCP connections look between device.
- A kind of 8. pre-load means, it is characterised in that including:Transmitting element, for sending access request to web page server, the access request includes the domain name of webpage to be shown;Unit is established, for obtaining protocol responses data corresponding with domain name from local, the protocol responses data include The domain name list of at least one child resource of the webpage to be shown;Established according to the domain name list of at least one child resource The transmission control protocol TCP connection of each child resource;Receiving unit, the web data of the webpage to be shown sent for receiving the web page server, the webpage number According to the primary resource for including the webpage to be shown;Loading unit, for loading the primary resource of the webpage to be shown, the webpage to be shown is loaded according to the TCP connections Child resource, form the webpage to be shown.
- 9. device according to claim 8, it is characterised in that the protocol responses data also include time threshold;It is described Device also includes:Determining unit, for determining whether the storage duration of the protocol responses data is less than or equal to time threshold;If the unit of establishing is less than or equal to the time threshold specifically for the storage duration of the protocol responses data, The TCP connections of each child resource are established according to the domain name list of at least one child resource.
- 10. a kind of preload device, it is characterised in that the equipment includes communication interface and processor:Wherein described processor, for sending access request, the access request to web page server by the communication interface Include the domain name of webpage to be shown;Protocol responses data corresponding with domain name, the protocol responses data are obtained from local The domain name list of at least one child resource including the webpage to be shown;According to the domain name list of at least one child resource Establish the transmission control protocol TCP connection of each child resource;The web page server is received by the communication interface to send out The web data of the webpage to be shown sent, the web data include the primary resource of the webpage to be shown;Described in loading The primary resource of webpage to be shown;The child resource of the webpage to be shown is loaded according to the TCP connections, forms the net to be shown Page.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610590423.2A CN107656934B (en) | 2016-07-25 | 2016-07-25 | Preloading method, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610590423.2A CN107656934B (en) | 2016-07-25 | 2016-07-25 | Preloading method, device and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107656934A true CN107656934A (en) | 2018-02-02 |
CN107656934B CN107656934B (en) | 2021-09-07 |
Family
ID=61126716
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610590423.2A Active CN107656934B (en) | 2016-07-25 | 2016-07-25 | Preloading method, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107656934B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110020305A (en) * | 2017-11-29 | 2019-07-16 | 腾讯科技(武汉)有限公司 | Webpage loading method, device, computer equipment and storage medium |
CN111061974A (en) * | 2019-11-26 | 2020-04-24 | 贝壳技术有限公司 | Client page loading method and device and page loading method and system |
CN111191158A (en) * | 2019-12-27 | 2020-05-22 | 北京达佳互联信息技术有限公司 | Webpage resource caching method and device, computer equipment and storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6442658B1 (en) * | 1997-01-31 | 2002-08-27 | Macromedia, Inc. | Method and apparatus for improving playback of interactive multimedia works |
US20050080882A1 (en) * | 1998-09-11 | 2005-04-14 | Philyaw Jeffry Jovan | Digital ID for selecting web browser and use preferences of a user during use of a web application |
CN102474500A (en) * | 2009-12-22 | 2012-05-23 | 上海贝尔股份有限公司 | Method and device for providing network service to a mobile user equipment |
CN102710748A (en) * | 2012-05-02 | 2012-10-03 | 华为技术有限公司 | Data acquisition method, system and equipment |
CN103365695A (en) * | 2013-07-31 | 2013-10-23 | 广州市动景计算机科技有限公司 | Method and device for increasing sub-resource loading speed |
CN103955495A (en) * | 2014-04-18 | 2014-07-30 | 百度在线网络技术(北京)有限公司 | Downloading method and device for page sub-resource |
CN104156421A (en) * | 2014-08-06 | 2014-11-19 | 百度在线网络技术(北京)有限公司 | Method, device and system for displaying page |
CN104965659A (en) * | 2015-07-06 | 2015-10-07 | 无锡天脉聚源传媒科技有限公司 | Page information preloading method and apparatus |
-
2016
- 2016-07-25 CN CN201610590423.2A patent/CN107656934B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6442658B1 (en) * | 1997-01-31 | 2002-08-27 | Macromedia, Inc. | Method and apparatus for improving playback of interactive multimedia works |
US20050080882A1 (en) * | 1998-09-11 | 2005-04-14 | Philyaw Jeffry Jovan | Digital ID for selecting web browser and use preferences of a user during use of a web application |
CN102474500A (en) * | 2009-12-22 | 2012-05-23 | 上海贝尔股份有限公司 | Method and device for providing network service to a mobile user equipment |
CN102710748A (en) * | 2012-05-02 | 2012-10-03 | 华为技术有限公司 | Data acquisition method, system and equipment |
CN103365695A (en) * | 2013-07-31 | 2013-10-23 | 广州市动景计算机科技有限公司 | Method and device for increasing sub-resource loading speed |
CN103955495A (en) * | 2014-04-18 | 2014-07-30 | 百度在线网络技术(北京)有限公司 | Downloading method and device for page sub-resource |
CN104156421A (en) * | 2014-08-06 | 2014-11-19 | 百度在线网络技术(北京)有限公司 | Method, device and system for displaying page |
CN104965659A (en) * | 2015-07-06 | 2015-10-07 | 无锡天脉聚源传媒科技有限公司 | Page information preloading method and apparatus |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110020305A (en) * | 2017-11-29 | 2019-07-16 | 腾讯科技(武汉)有限公司 | Webpage loading method, device, computer equipment and storage medium |
CN110020305B (en) * | 2017-11-29 | 2023-12-12 | 深圳市雅阅科技有限公司 | Webpage loading method, webpage loading device, computer equipment and storage medium |
CN111061974A (en) * | 2019-11-26 | 2020-04-24 | 贝壳技术有限公司 | Client page loading method and device and page loading method and system |
CN111191158A (en) * | 2019-12-27 | 2020-05-22 | 北京达佳互联信息技术有限公司 | Webpage resource caching method and device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN107656934B (en) | 2021-09-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103765419B (en) | System and method for providing offline access in main frame document services | |
CN102594813B (en) | Many account login methods and device | |
CN100535900C (en) | Method and system for rendering asynchronous portal page | |
CN101147145B (en) | Embedded web-based management method | |
RU2589306C2 (en) | Remote viewing session control | |
CN104035753B (en) | A kind of method and system of double WebView displayings customized web pages | |
US20170132182A1 (en) | Use of Method Overrides for Dynamically Changing Visible Page Content | |
US20150207660A1 (en) | Client-side url redirection | |
US9817799B2 (en) | Method and apparatus for providing web pages | |
CN104202360A (en) | Webpage access method, device and router | |
CN101482882A (en) | Method and system for cross-domain treatment of COOKIE | |
CN101632071A (en) | System and method for preloading content on the basis of user context | |
JP6383430B2 (en) | Profile-based cache management | |
CN106897336A (en) | Web page files sending method, webpage rendering intent and device, webpage rendering system | |
CN102346891A (en) | Network transaction method and server | |
IL270524B2 (en) | Matching and attribution of user device events | |
CN110266661A (en) | A kind of authorization method, device and equipment | |
US20140280699A1 (en) | Method and apparatus for enabling discovery and communications between unrelated browser sessions | |
CN107181779A (en) | Processing method, the device and system of access request | |
CN107656934A (en) | One kind preloads method, apparatus, equipment | |
CN107105336A (en) | Data processing method and data processing equipment | |
CN105095220B (en) | A kind of browser implementation method, terminal and virtualization agent device | |
US20090228549A1 (en) | Method of tracking usage of client computer and system for same | |
JP2002334033A (en) | Method, system, device, program, and recording medium for information distribution | |
CN111339456A (en) | Preloading method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20221117 Address after: 1402, Floor 14, Block A, Haina Baichuan Headquarters Building, No. 6, Baoxing Road, Haibin Community, Xin'an Street, Bao'an District, Shenzhen, Guangdong 518133 Patentee after: Shenzhen Yayue Technology Co.,Ltd. Address before: 2, 518000, East 403 room, SEG science and Technology Park, Zhenxing Road, Shenzhen, Guangdong, Futian District Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd. |
|
TR01 | Transfer of patent right |