File Level CDN Version

I looked at Amazon.com and I noticed that their static files are versioned at the file level (for example: s9-multipack-min.V171170235.js) instead of the directory level.

Can you imagine some good practical methods for managing different versions at the file level, and where is the best place to keep the latest version for each file? We use SVN and our static files will be hosted on Amazon S3 CDN

+3
source share
1 answer

You do not need to store multiple files. Just set up your rewrite module so that it overwrites each one /js/filename.vNNN.jsbefore /js/filename.js.

As you can see the url

http://z-ecx.images-amazon.com/images/G/01/browser-scripts/us-site-wide-1.2.6/site-wide-11734552808.js._V169197_.js

indicates the same content as

http://z-ecx.images-amazon.com/images/G/01/browser-scripts/us-site-wide-1.2.6/site-wide-11734552808.js._V169174097_.js

does. Note on the last modified part

+1
source

Source: https://habr.com/ru/post/1795928/


All Articles