http://my.server/js/lib/v123/lib.js
I just noticed the Sonatype repository using a different scheme, which is more like this:
http://my.server/js/lib/lib.js?v123
The version number is stored in a query parameter in this scheme. I assume that this parameter is actually ignored as most webservers would do with static content.
The advantages I see in this approach are:
- updates can be done in-place (easier deployment, no need to keep multiple copies around)
- the target doesn't even have to be aware of the scheme
- the client could even go as far as generating a URL based on its revision, causing a retrieval for each of its upgrades, which would be too much but very safe
- any reference will always retrieve the newest version (which could break things subtly if for some reason old references are still around somewhere)
- (related to the one above) it's just not a proper URI since it identifies a resource with the query parameter (unless you consider the resource as spanning all versions and the versions different representations of it)
- I don't know if I trust all caches to handle the query part properly (I never even looked into that)
No comments:
Post a Comment