Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Akamai pull from origin when query string parameters change for cached assets

So, I want to add versioning to my css and js files. The way I would like to do this is by appending a query string to the end of the asset path so

/foo/bar/baz.css

Becomes

/foo/bar/baz.css?version=1

This will work for proxies and browser cache, however, I was wondering if Akamai will know this is a new file and re-request it from the origin server? My assumption would be that it would re-request the file from the origin server but figured I'd ask if anyone knew for sure.

like image 700
JoeyP Avatar asked Mar 23 '11 20:03

JoeyP


2 Answers

Yes. It matches exact URLs for all GET requests.

like image 101
jiggy Avatar answered Oct 30 '22 20:10

jiggy


Not quite. It depends on the CDN configuration. Query String values are usually not part of the cache-key. So, when setting up the CDN delivery config, make sure you explicitly add the option to include the Query String as part of the cache-key. Otherwise, you will end up serving inconsistent versions due to having a cache key that does not vary based on the query string value, in this case, the asset version.

like image 32
MikeBoss Avatar answered Oct 30 '22 20:10

MikeBoss