4 ms·
For the most-common use case (people using code.jquery.com/jquery.js), this won't work. That URL always links to the latest version, which updates with every ne
by huskyr 12y ago
For the most-common use case (people using code.jquery.com/jquery.js), this won't work. That URL always links to the latest version, which updates with every new release, hence invalidating the hash (and the developer's website).
You could argue that a well-educated developer should know that and only use this for tagged releases though.
- DougBTX 12y agoThat file is probably going to stay at v1.11.1 forever now: http://blog.jquery.com/2014/07/03/dont-use-jquery-latest-js/ http://blog.jquery.com/2014/07/03/dont-use-jquery-latest-js/ (The blog post talks about /jquery-latest.js, but I'd imagine the same goes for all the version-number-free urls.)
- _ikke_ 12y agoIf the jquery version changed, their site could break anyway due to changes in how the library worked.
- huskyr 12y agoCould, yes. But in practice this happens very rarely. Breaking the site because a new version is released with an old hash will happen.
- aaronm67 12y agoVery rarely being every single release? You should not be using a changing library in any production code, you're just asking for problems. If all you're using jQuery for is a document.querySelectorAll polyfill + the most primitive event handling, you're possibly safe, as those don't change terribly often...but at that point, you should probably be using a different library or a custom build of jQuery.
- joshuacc 12y agoUnfortunately, it's the people least qualified to assess the safety of using an always-changing version who are most likely to do so.
- deleted 12y ago[deleted]