Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CDN and URL's with query-strings

Tags:

url

cdn

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

will URL's like this work with your average content-delivery-network?

like image 421
n8wrl Avatar asked Aug 25 '09 18:08

n8wrl


People also ask

Does CloudFront cache query string?

If you don't forward query strings, CloudFront doesn't cache based on query string parameters. Forward query strings to the origin, and cache based on all parameters in the query string. Forward query strings to the origin, and cache based on specified parameters in the query string.

Does URI include query string?

There is no protocol information given in URI. It contains components such as protocol, domain, path, hash, query string, etc. It contains components like scheme, authority, path, query, fragment component, etc. Not all URIs are URLs since a URI can be a name instead of a locator.

Do query strings affect SEO?

Multiple query string parameters can be used within a single URL, which can impact a website's SEO and organic search performance in several ways, including causing duplicate content and crawling issues.

What is CDN query?

Overview. With Azure Content Delivery Network (CDN), you can control how files are cached for a web request that contains a query string. In a web request with a query string, the query string is that portion of the request that occurs after a question mark (?).


2 Answers

Amazon CloudFront turned on this feature in May 2012

like image 118
sunilr Avatar answered Sep 30 '22 07:09

sunilr


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.

like image 28
James Lawruk Avatar answered Sep 30 '22 06:09

James Lawruk