Various CDNs (Google's for example) allow access of the latest bug fix release of a certain series by not specifying the minor version number. This makes sense, because such releases usually don't contain anything that can breakage, but only contain bug, performance or stability fixes (maybe better support for certain browsers).
To give an example. The current:
http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.0/jquery-1.8.0.min.js
should also be available as:
http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8/jquery-1.8.min.js
and once 1.8.1 is released link to:
http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.1/jquery-1.8.1.min.js
For comparison see:
https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js
https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
(Maybe it would be better to mention this in its own ticket, but specifying the version number twice seems unnecessary.)
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
So there's a few issues with implementing this:
Cache-Control
max-age you might not actually get bug fixes for a long time (e.g. 1 year)In regards to including the version number in the file name, my policy is to include the file _exactly_ as it is provided by the library maintainer, filename and all, e.g. http://code.jquery.com/jquery-1.8.0.min.js
I鈥檇 also appreciate this, in my case for jQuery as well. It would be great to automatically benefit from bug fix releases (third digit) without having to monitor bug fix releases and updating paths every time.
I understand this may be complicated because it needs adjustments to the existing architecture, but I think it would make a great additional to the service.
This is most likely out of our scope for now, we are trying to keep management overheads down.
Though will keep the ticket alive if anyone has any good ideas. Symlinks sounds like the way to go but I'm not sure I want to be managing hundreds of symlinks etc
Thanks @hpatoio
In #1495 I offered to make a shell script that would manage the multitude of shell scripts and it could be added as part of your build process. @ryankirkman had a concern that any sort of complexity might not work. Have symlinks even been tried? If not, I'd be happy to give a pull request that would add symlinks for a single project to save on clutter. It appears that the CDN might just proxy the first request through to another host, so I suppose it's more important to see if the original host supports symlinks.
:+1: It will be a cool and needed feature.
Tagging in https://github.com/cdnjs/cdnjs/issues/987
:+1: nice idea ;)
whats your schedule for do it ?
If not wild card support, how about using "latest", especially for libs that use the npm hook - in npm there always is a latest tag. That could even promote moving to verified sources (npm) for the libs, and reduce manual submissions.
Completely agree with that, i guess having a /latest/_.js and /latest/_.min.js would be easier to maintain rather than using wildcards
Do you forgot this feature/issue ?!
:+1:
I'd really like for latest
or last
to work. Useful also in examples of how to use libraries.
+1
+1
+1
Closing, there is no feasible way to implement this whilst we have a focus on asset integrity with SRI.
Most helpful comment
I'd really like for
latest
orlast
to work. Useful also in examples of how to use libraries.