CDN和带有查询字符串的URL [英] CDN and URL's with query-strings
问题描述
我们在Web服务器上有一个图像文件夹,可以通过CDN发布。有时,我们会在URL后面附加类似查询字符串的语法,以帮助我们刷新已更改的内容,即使这种情况很少发生。例如:
We have an images folder on our web servers that we may publish via a CDN. Sometimes we append query-string like syntax to URL's to help us freshen content that has changed, even though it rarely does. Example:
/images/file.png?20090821
URL是否可以在您的平均内容传送网络中使用?
will URL's like this work with your average content-delivery-network?
推荐答案
<是,我们使用Akamai,它会保留每个请求的Distict URL(包括查询字符串)的缓存副本。因此,对/images/file.png?20090821的第一个请求将转到原始服务器。之后对/images/file.png?20090821的请求将从Akamai服务器获取图像。第二天,假设img src更改为/images/file.png?20090822,则第一个请求将再次发送到原始服务器。
Yes, We use Akamai, which keeps a cached copy of each distict url requested including the querystring. So the first request for /images/file.png?20090821 will go to the origin server. Requests there after for /images/file.png?20090821 will get the image from the Akamai servers. The next day, assuming the img src changes to /images/file.png?20090822, the first request will go to the origin server again.
这篇关于CDN和带有查询字符串的URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!