Summary of the invention
It is an object of the invention to provide one and be capable of that data are autosynchronous to be passed through
CDN downloads implementation method and device, server, the client of resource.
First aspect, the invention provides a kind of device that realizes being downloaded resource by CDN, bag
Include:
Blocking module, for intercepting the raw page data that source server sends to client;Institute
State raw page data and include the address information of described source server and static resource in described source
The address information of server;
Modified module, for servicing static resource in the raw page data of interception in described source
The address information of device is adjusted to point to the chained address of the CDN server of correspondence, after being revised
Web data;Wherein, described chained address carries the address information of described source server
And static resource is in the address information of described source server;
Sending module, for amended web data is sent to client, so that described visitor
Family end downloads corresponding static resource from corresponding CDN server.
Optionally, described modified module is for existing static resource in the raw page data intercepted
The address information of described source server is modified to point to the chained address of the CDN server of correspondence
And the content-length in adjustment web data, obtain amended web data.
Optionally, described chained address also carries the reference address information of static resource, described
The reference address information of static resource obtains from described web data.
Second aspect, the invention provides a kind of client, including:
First receiver module, is used for receiving web data;Static resource in described web data
Address is the chained address pointing to CDN server, and described chained address carries static resource institute
The address information of source server and static resource address information in source server;
Download request module, download phase for the address according to static resource to corresponding CDN request
The static resource answered;
Second receiver module, for receiving the static resource that CDN server returns.
Optionally, the static resource that CDN server returns is that described CDN server is according to institute
State the address information of the source server at the static resource place carried in chained address, and static
Resource address information in source server is downloaded to source server.
Optionally, described chained address also carries the reference address information of static resource.
The third aspect, the invention provides a kind of server, and described server includes:
Receiver module, initiates according to the address of static resource in web data for receiving client
Static resource download request;In described web data, the address of static resource is for pointing to CDN clothes
The chained address of business device, described chained address carries the ground of the source server at static resource place
Location information and the static resource address information in source server;
Judge module, asks for judging that the static resource that described first receiver module receives is downloaded
The static resource being asked to download is asked the most to cache;
Sending module, is used for when described judge module judges that corresponding static resource caches,
The corresponding static resource of caching is sent to described client;Phase is judged at described judge module
When the static resource answered is uncached, carry according in the chained address that corresponding static resource is corresponding
The address information of source server at static resource place and static resource in source server
Address information asks corresponding static resource to corresponding source server, the most quiet receiving
Cache after state resource and be sent to described client.
Optionally, described chained address also carries the reference address information of static resource;
Described server also includes:
Addressed module, is used for after described judge module judges that corresponding static resource is uncached,
Described sending module according to the original address of corresponding static resource to corresponding source server address
Before asking corresponding static resource, from corresponding chained address, extract corresponding source server
Address, when extracting the address failure of corresponding source server, according to corresponding chained address
In reference address Referer determine the address of corresponding source server.
5th aspect, the invention provides a kind of implementation method being downloaded resource by CDN, its
In, including:
Intercept the raw page data that source server sends to client;Described raw page data
The address information and the static resource that include described source server are believed in the address of described source server
Breath;
In the raw page data that will intercept, static resource is adjusted in the address information of described source server
The whole chained address for pointing to corresponding CDN server, obtains amended web data;Its
In, the address information and the static resource that carry described source server in described chained address exist
The address information of described source server;
Amended web data is sent to client, so that described client is from correspondence
CDN server is downloaded corresponding static resource.
Preferably, described will intercept raw page data in static resource at described source server
Address information be modified to point to the chained address of CDN server of correspondence, obtain amended
Web data includes:
Static resource in the raw page data of interception is repaiied in the address information of described source server
It is changed to point to the chained address of the CDN server of correspondence and adjusts the content in web data
Length, obtains amended web data.
Preferably, described chained address also carries the reference address information of static resource, described
The reference address information of static resource obtains from described web data.
5th aspect, the invention provides a kind of implementation method being downloaded resource by CDN, bag
Include:
Receive web data;In described web data, the address of static resource is for pointing to CDN service
The chained address of device, described chained address carries the address of the source server at static resource place
Information and the static resource address information in source server;
Corresponding static money is downloaded to corresponding CDN server request in address according to static resource
Source;
Receive the static resource that CDN server returns.
Optionally, the static resource that CDN server returns is that described CDN server is according to institute
State the address information of the source server at the static resource place carried in chained address and static money
Source address information in source server is downloaded to source server.
Optionally, described chained address also carries the reference address information of static resource.
6th aspect, the invention provides a kind of implementation method being downloaded resource by CDN, bag
Include:
Receive the static resource download that client is initiated according to the address of static resource in web data
Request;In described web data, the address of static resource is the chain ground connection pointing to CDN server
Location, described chained address carries the address information of the source server at static resource place and quiet
State resource address information in source server;
Judge that the static resource being asked to download caches the most;
If cached, the corresponding static resource of caching is sent to described client;
If it is uncached, according to the static state carried in the chained address that corresponding static resource is corresponding
The address information of the source server at resource place and the static resource address letter in source server
Cease and ask corresponding static resource to corresponding source server, receiving corresponding source server
Cache and be sent to described client after the corresponding static resource returned.
Optionally, described chained address also carries the reference address information of static resource;
Being asked, the static resource downloaded is uncached, according to the chain that corresponding static resource is corresponding
Address information and the static resource of the source server at the static resource place carried in ground connection location exist
Before address information in source server asks corresponding static resource to corresponding source server,
Described method also includes: extract the address letter of corresponding source server from corresponding chained address
Breath, when extracting the address information failure of corresponding source server, according to corresponding chained address
In reference address information determine the address of corresponding source server.
In the present invention, intercept the raw page data that source server sends to client;Described former
Beginning web data includes the address information of described source server and static resource services in described source
The address information of device;In the raw page data that will intercept, static resource is at described source server
Address information is adjusted to point to the chained address of the CDN server of correspondence, obtains amended net
Page data;Wherein, described chained address carries described source server address information and
Static resource is in the address information of described source server;Amended web data is sent to visitor
Family end, so that described client downloads corresponding static resource from corresponding CDN server.
So client can jump to corresponding CDN server request static resource, if the most quiet
State resource is not cached to CDN server, it is possible to trigger CDN server according to chained address
The address of indicated source server and the address in source server of static resource actively to
Source server asks corresponding static resource.Thus achieve CDN server to source server
Active synchronization.
Detailed description of the invention
Below in conjunction with the accompanying drawings and embodiment, the detailed description of the invention of the present invention is made the most in detail
Describe.Following example are used for illustrating the present invention, but are not limited to the scope of the present invention.
As it is shown in figure 1, the one for one embodiment of the invention offer downloads resource by CDN
The schematic flow sheet of implementation method, the method can be by the functional module being positioned at source server side
Or the device comprising this functional module performs, and the method may include that
Step 101, intercepts the raw page data that source server sends to client;This is original
Web data includes the address information of this source server and static resource on the ground of this source server
Location information.
Step 102, in the raw page data that will intercept, static resource is on the ground of this source server
Location information is adjusted to point to the chained address of the CDN server of correspondence, obtains amended webpage
Data;Wherein, described chained address carries the address information of described source server and quiet
State resource is in the address information of described source server;
Step 103, is sent to client by amended web data, so that client is from right
The CDN server answered is downloaded corresponding static resource.
In the embodiment of the present invention, client can jump to phase after receiving corresponding web data
The CDN server request static resource answered, if corresponding static resource is not cached to CDN
Server, it is possible to trigger the CDN server address according to the source server indicated by chained address
And the address that static resource is in source server is actively to the corresponding static money of source server request
Source.Thus achieve the CDN server active synchronization to source server.
Each above-mentioned step all can be accomplished in several ways, such as step 101,
According to the form of web data, source server can be sent to the data of client be identified,
Intercept after recognizing web data;Or can also register in source server and need interception
Data, make source server add in web data when sending web data and intercept mark accordingly
Know, and intercept with after intercepting the data identified monitoring, or existing by other
Mode realize the interception to raw page data, will not enumerate at this.
It can be appreciated that in the embodiment of the present invention, the raw page data of indication is actual refers to that source services
Device is sent to the web data of client, and " original " two word here is in order to amended
Web data makes a distinction.Here raw page data can be that client inputs according to user
Web data corresponding to the webpage asked to source server of domain name, it is also possible to for source server master
The web data of trend client push.
In the specific implementation, the address information of source server may be the domain-name information of source server,
Or IP information, static resource address information in source server may be that this static resource exists
Routing information in source server or label information.Certainly source server address information and/or
Static resource address information in source server can also show as other forms, its concrete lattice
Formula does not interferes with the enforcement of the present invention, and corresponding technical scheme also should fall into the protection of the present invention
Scope.
In the embodiment of the present invention, the static resource of indication can be specially the picture of js, css form.
For step 102, in the specific implementation, can be at static resource on the ground of source server
The domain name of corresponding CDN server is directly added, afterwards by static resource in source before the information of location
The address information of server is added static resource to and is formed after the address information of source server and take
With address information in source server of the address information of source server and static resource and refer to
To the chained address of CDN server.So amended web data is being sent to client
Afterwards, when client downloads static resource according to the Address requests of static resource, it downloads request
Can jump in the CDN server of correspondence.Understandable, indication in the embodiment of the present invention
Corresponding CDN server be for purpose client, typically, it is refer to client
End falls into the CDN server of its coverage, so can realize downloading nearby.
When specifically applying, except comprising the raw page data that will intercept in above-mentioned steps 102
Middle static resource is modified to point to corresponding CDN server in the address information of source server
Outside chained address, it is also possible to include the content-length adjusting in the heading of web data
The process of (Content length).So, client after receiving corresponding web data,
Whether mistake can be there is according to the web data that the checking of this content-length sends.
When specifically applying, raw page data may also contain the reference address of static resource
(Referer) information, the most in a step 102, it is also possible to by the reference address of static resource
Information is carried in the chained address in web data after the modification.Advantage of this is that, when
When client asks this chained address, corresponding CDN server can obtain according to this chain ground connection
Location determines the reference address information of corresponding static resource, if so corresponding CDN server
Can not correctly obtain the address information of source server in chained address, can be by this reference address
Information determines the address information of source server.When specifically applying, this reference address information is permissible
It is positioned at the end of whole chained address.
When specifically applying, in step 102, static resource in the raw page data that will intercept
The chained address of the CDN server that the address information at source server is adjusted to point to correspondence can
To refer to be revised as static resources all in raw page data in the address information of source server
Point to the chained address of corresponding CDN server, it is also possible to simply mean to exist part static resource
Address information in source server is modified to point to the chained address of the CDN server of correspondence.Right
The static resource not being modified in address, client, can be directly after receiving this web data
This part static resource is downloaded to source server request.
On the other hand, one embodiment of the present of invention additionally provides another kind of by CDN download money
The implementation method in source, the method can be by client executing, as in figure 2 it is shown, be the method
Schematic flow sheet, including:
Step 201, receives web data;In described web data, the address of static resource is for referring to
To the chained address of CDN server, described chained address carries the source clothes at static resource place
The address information of business device and static resource address information in source server;
Step 202, downloads corresponding according to the address of static resource to corresponding CDN server request
Static resource;
Step 203, receives the static resource that CDN server returns.
In the method that the embodiment of the present invention provides, when client according to the address of static resource to right
When corresponding static resource is downloaded in the CDN server request answered, i.e. request accesses this sensing CDN
During the chained address of server, its access request can be jumped in CDN server, CDN
Server can be believed according to the address of the source server at the static resource place carried in chained address
Breath and static resource address information in source server are downloaded corresponding static from server
Resource is also cached to CDN server, so on the one hand, can be realized by CDN server
On the other hand download nearby, CDN server can be made according to the address information of source server and quiet
State resource address information in source server is actively to the static money that source server request is uncached
Source, it is possible to make CDN server be automatically obtained synchronization with source server.
Here the web data received can be the webpage that the step 102 in Fig. 1 obtains
Data.Accordingly, the chained address in web data here can also carry static resource
Reference address information.Each step in step 201-step 203 to realize process permissible
Process corresponding with prior art is consistent, does not repeats them here.
Another further aspect, one embodiment of the present of invention additionally provides what another was downloaded by CDN
Implementation method, the method can be performed by CDN server, as it is shown on figure 3, be the method
Schematic flow sheet, including:
Step 301, receive client according in web data static resource address initiate quiet
State resource download request;This web data can be in the step 202 in Fig. 2 client according to
Oestrused when corresponding static resource is downloaded in corresponding CDN server request in the address of static resource
Static resource download request, accordingly, now in web data the address of static resource for refer to
To the chained address of CDN server, and chained address carries the source service at static resource place
The address information of device and the static resource address information in source server;
Step 302, it is judged that asked the static resource downloaded the most to cache;If it is not, turn to
Step 303, if it is not, turn to step 305;
Step 303, according to the static money carried in the chained address that corresponding static resource is corresponding
The address information of the source server at place, source and the static resource address information in source server
To corresponding source server ask corresponding static resource, rear steering step 304;
Step 304, caches after receiving the corresponding static resource that corresponding source server returns,
Rear steering step 305.
Step 305, sends the corresponding static resource of caching to client;
In the embodiment of the present invention, receiving client according to the address of static resource in web data
After the static resource initiated downloads request, it is judged that whether the static resource asked caches, if so,
Then the corresponding resource of caching is sent to client, if it is not, then to corresponding static resource
The source server at place asks corresponding static resource, slow after receiving corresponding static resource
Deposit.So, for occur update static resource, CDN server can according to first for
This static resource download request to source server ask corresponding static resource, be automatically obtained with
The synchronization of source server.For there is not the static resource updated, CDN server is due at it
Before download and cached corresponding static state according to the flow process of above-mentioned steps 303 and step 304
Resource, it is possible to directly return corresponding static resource to client.Thus achieve static money
The download nearby in source.
Although it is pointed out that shown in Fig. 3, after the step 304, turn to step
The step of rapid 305, but in actual applications, after requesting corresponding static resource first,
First static resource can also be sent to client, cache the most again, send quiet to client
The precedence relationship of state resource and caching static resource has no effect on the enforcement of the present invention.
When specifically applying, for the static resource received from source server, caching
Time, can using this static resource address information in source server as this static resource this
Label information in ground caching, or according to this static resource address information in source server
Static resource is cached in CDN server corresponding address.So CDN server under
Secondary receive for this static resource download ask time, it is possible to find out easily this static state provide
Source also sends to client.Certainly, in actual applications, it is also possible to deposit in other ways
Storage static resource, such as by this static resource address in source server according to default rule
Carry out conversion map to obtain, in local storage address, being cached to this locality afterwards, or by quiet
After state resource stores this locality, record address and storage that static resource is stored in source server
At the corresponding relation of local address, CDN server is follow-up to be received for this static resource
Download request time also can find this static resource and send to client, the embodiment of the present invention
The mode provided should not be construed as the restriction to protection scope of the present invention.
When specifically applying, in step 303, also should include obtaining corresponding static resource
The source server address information at place and acquisition static resource address information in source server
Process, afterwards according to address information and the static resource ground in source server of source server
Location information sends request to source server and downloads corresponding static resource, and this request comprises static money
Source address information in source server, to ask corresponding static resource to source server.More
Further, in step 303, when the domain name that address information is source server of source server,
When static resource address information in source server is the path in source server, can be by
After path in source services is placed on the domain name of source server, generates one and point to source server
Link, and initiate, for this link, the request of downloading, to download corresponding to source server request
Static resource.
Below in conjunction with concrete application scenarios, the complete embodiment of the present invention is carried out specifically
Bright.As shown in Figure 4, in this application scenarios, including source server, intercept server, visitor
Family end and CDN server, wherein, intercept server is deployed between source server and client
The upper side near source server of route, by network respectively with source server and client phase
Even, CDN server is connected with source server and client respectively by network.Wherein, here
Intercept server in order to perform the method described in Fig. 1, client is in order to perform in Fig. 2
Method, CDN server is in order to perform the method in Fig. 3, it is assumed that the domain name of its binding is
www.cdn1XXX1.com;Assume that the domain name that source server is bound is simultaneously
www.1XXX1.com.Also assume that the most registered in advance needs of intercept server is blocked
Cutting the event of response, source server is sending the web data that the event needing to intercept response is corresponding
Time, add in the heading of this web data and intercept label accordingly.
The idiographic flow of the method can be as it is shown in figure 5, include:
Step 501, client receives domain name www.1XXX1.com of user's input, takes to source
Business device sends access request.Rear steering step 502.
Step 502, source server receives the access request that client sends, and sends to client
Web data.Rear steering step 503.
Assume that source server is sent to the part sheet in the web data of client in source file part
Section as shown in Figure 6, wherein comprises the static resource of the picture of a css form, and this static state provides
Path link href="/bootstrap/css/bootstrap.min.css " in source server, the source, should
The reference address of static resource is rel=" stylesheet ", and reference address is positioned at this static file and exists
After path in source server.It addition, carry source in the label information of this web data
Domain name www.1XXX1.com of server.And assume the label information in this web data is taken
With for representing the interception mark that these web data needs intercept.
Step 503, intercept server intercepts this web data, by right for static resource therein institute
Path link href="/bootstrap/css/bootstrap.min.css " answered replaces with one and points to institute
State CDN server, and comprise the domain name of source server and this static resource in source server
One chained address in path, and revise the content-length of this web data.Rear steering step
505。
Owing to carrying interception mark in this web data, intercept server can be according to intercepting mark
Know and determine that this web data needs to be intercepted.
The concrete form of this chained address can bewww.cdn1XXX1.com/bootstrap/css/
bootstrap.min.css?Web_real_domain=www.1XXX1.com" rel=" stylesheet ",
Wherein the domain name of CDN server comprises www.cdn1XXX1.com, and this static resource takes in source
Path/bootstrap/css/bootstrap.min.css in business device, the domain name of source server
(web_real_domain) www.1XXX1.com, the reference address of this static information
Rel=" stylesheet ".Web data content modification in Fig. 6 is permissible after the amendment of step 504
As shown in Figure 7.
Step 504, amended web data is sent to client by intercept server.
Step 505, client receives the amended web data that intercept server sends.It
Rear steering step 506.
Step 506, the address www. of client static resource in this web data
cdn1XXX1.com/bootstrap/css/bootstrap.min.css?Web_real_domain=www.1
XXX1.com " rel=" stylesheet " initiates the request of downloading.Rear steering step 507.In reality
In application, client is likely to need to access other resources in web data, the most dynamically provides
Sources etc., these are not the contents of institute of the present invention major concern, are not carrying out specifically at this
Bright.Owing to this download request is directed to the link address of CDN server, then this download request meeting
It is diverted this CDN server.
Step 507, CDN server receives the download request that client sends, it is judged that self clothes
Whether business device has cached corresponding static resource, if it is not, then turn to step 508, if so,
Then turn to step 512.
Concrete, CDN server extracts this static state from the chained address asking this static resource
Resource path/bootstrap/css/bootstrap.min.css in source server, it is judged that self be
No cache this path correspondence static resource.
Step 508, CDN server is extraction source clothes from the chained address asking this static resource
The chained address www.1XXX1.com of business device, and the road that this static resource is in source server
Footpath/bootstrap/css/bootstrap.min.css.Rear steering step 509.
If if could not be successfully " from the chained address asking this static resource in step 508
The chained address of extraction source server ", then can extract the reference address of this static resource
Rel=" stylesheet ", obtains the chained address of source server afterwards according to this reference address.
Step 509, CDN server generates one for asking this static resource to source server
Link www.1XXX1.com/bootstrap/css/bootstrap.min.css, concurrently rise for
The download request of this link.Rear steering step 510.
Step 510, source server receives the download request that CDN sends, and it is quiet that extraction is asked
State resource path bootstrap/css/bootstrap.min.css in source server, by this path
The static resource of lower storage sends to CDN server.Rear steering step 511.
Step 511, CDN server receives the static resource that source server sends, by this static state
Resource is stored under the path of bootstrap/css/bootstrap.min.css.Rear steering step
512。
Step 512, the static resource of caching is sent to client by CDN server.
So far, complete the process that static resource is downloaded by CDN server, if this static state
Resource is the static resource occurring to update, then the judged result in step 507 is no, CDN
Server asks this static resource to source server voluntarily, in this way, it is achieved that update
The automatic synchronization of static resource.In subsequent process, if still other client is initiated
Download for this static resource is asked, according to above-mentioned flow process, in the judgement of step 507
Result can be yes, jumps directly to step 512, sends the static resource of caching to client.
The download nearby of static resource is thus achieved by CDN server.
A kind of realization dress being downloaded resource by CDN that Fig. 8 provides for one embodiment of the invention
The structural representation put, what this embodiment provided downloads realizing device and can making of resource by CDN
Being applied in the method shown in Fig. 5 for intercept server, this device may include that interception mould
Block 801, modified module 802 and sending module 803, wherein,
Blocking module 801, for intercepting the raw page data that source server sends to client;
Described raw page data includes the address information of described source server and static resource described
The address information of source server;
Modified module 802, in the raw page data that will intercept, static resource is in described source
The address information of server is adjusted to point to the chained address of the CDN server of correspondence, is repaiied
Web data after changing;Wherein, described chained address carries the address of described source server
Information and static resource are in the address information of described source server;
Sending module 803, for amended web data is sent to client, so that institute
State client and download corresponding static resource from corresponding CDN server.
What the present embodiment provided realizes device by what CDN downloaded resource, intercept source server to
The raw page data that client sends;Described raw page data includes described source server
Address information and static resource in the address information of described source server;The original net that will intercept
In page data, static resource is adjusted to point to correspondence in the address information of described source server
The chained address of CDN server, obtains amended web data;Wherein, described chain ground connection
Location carries the address information of described source server and static resource at described source server
Address information;Amended web data is sent to client, so that described client is from right
The CDN server answered is downloaded corresponding static resource.So client can jump to accordingly
CDN server request static resource, if corresponding static resource is not cached to CDN clothes
Business device, it is possible to trigger CDN server according to the address of the source server indicated by chained address with
And the address in source server of static resource is actively to the corresponding static money of source server request
Source.Thus achieve the CDN server active synchronization to source server.
It is pointed out that the realization being downloaded resource by CDN that the embodiment of the present invention is provided
Device itself can be a functional module or be the device with corresponding function.Such as in reality
In the application of border, this device itself can be a function mould of source server or CDN server
Block.
When specifically applying, modified module 802 may be used in the raw page data that will intercept quiet
State resource is modified to point to corresponding CDN server in the address information of described source server
Content-length in chained address and adjustment web data, obtains amended web data.
When specifically applying, above-mentioned chained address also carries the reference address information of static resource,
The reference address information of described static resource obtains from described web data.
One embodiment of the present of invention additionally provides a kind of client, as it is shown in figure 9, this client
End includes the first receiver module 901, downloads request module 902 and the second receiver module 903, its
In,
First receiver module 901, is used for receiving web data;Static money in described web data
The address in source is the chained address pointing to CDN server, and described chained address carries static money
The address information of the source server at place, source and the static resource address letter in source server
Breath;
Download request module 902, for the address according to static resource under corresponding CDN request
Carry corresponding static resource;
Second receiver module 903, for receiving the static resource that CDN server returns.
The client that the embodiment of the present invention provides according to the address of static resource to corresponding CDN
When server request downloads corresponding static resource, i.e. request accesses this sensing CDN server
During chained address, its access request can be jumped in CDN server, CDN server energy
The address information of enough source servers according to the static resource place carried in chained address and quiet
State resource address information in source server is downloaded corresponding static resource from server and delays
It is stored to CDN server, so on the one hand, can realize downloading nearby by CDN server,
On the other hand CDN server can be made to exist according to address information and the static resource of source server
Address information in source server is actively to the static resource that source server request is uncached, it is possible to
CDN server is made to be automatically obtained synchronization with source server.
In some instances, the static resource that CDN server returns is described CDN server
The address information of the source server according to the static resource place carried in described chained address and
Static resource address information in source server is downloaded to source server.
When specifically applying, chained address here also carries the reference address letter of static resource
Breath.
One embodiment of the present of invention additionally provides a kind of CDN server, as shown in Figure 10,
Server includes receiver module 1001, judge module 1002 and sending module 1003, wherein,
Receiver module 1001, for receiving client according to the address of static resource in web data
The static resource initiated downloads request;In described web data, the address of static resource is for pointing to
The chained address of CDN server, described chained address carries the source service at static resource place
The address information of device and the static resource address information in source server;
Judge module 1002, for judging the static resource that the first receiver module 1001 receives
Download the static resource being asked to download the most to cache;
At judge module 1002, sending module 1003, for judging that corresponding static resource is the most slow
When depositing, the corresponding static resource of caching is sent to described client;At judge module 1002
Judge when corresponding static resource is uncached, according to the chained address that corresponding static resource is corresponding
In the address information of the source server at static resource place carried and static resource service in source
Address information in device asks corresponding static resource to corresponding source server, is receiving phase
Cache after the static resource answered and be sent to described client.
The CDN server that the embodiment of the present invention provides, is receiving client according in web data
After the static resource that the address of static resource is initiated downloads request, it is judged that the static resource asked
Whether cache, the most corresponding resource of caching is sent to client, if it is not, then
Source server to corresponding static resource place asks corresponding static resource, is receiving phase
Cache after the static resource answered.So, for there is the static resource updated, CDN server
Can ask to source server request corresponding static according to download for this static resource first
Resource, is automatically obtained synchronization with source server.
Optionally, above-mentioned chained address also carries the reference address information of static resource;
This CDN server also includes:
At judge module 1002, addressed module 1004, for judging that corresponding static resource does not delays
After depositing, sending module 1003 services to corresponding source according to the original address of corresponding static resource
Before the corresponding static resource of device Address requests, from corresponding chained address, extract corresponding source
The address of server, when extracting the address failure of corresponding source server, according to corresponding chain
Reference address Referer in ground connection location determines the address of corresponding source server.