-
-
Notifications
You must be signed in to change notification settings - Fork 11k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding jsDelivr link in README #1110
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the consensus is that we're using Unpkg for CDN. Unless you can think of advantages of using jsDeliver instead.
I summarized the advantages in my previous post. If those are not important enough, feel free to close this. |
2760755
to
48a7902
Compare
👋 @LukasDrgon would you mind posting a link here to the previous conversation? For my own edification. |
👋 @JustinBeckwith I think I was referring to my first post in this PR - larger network, including servers in China, failover, and other features focused on reliability (more details here and here). Also usage statistics for maintainers. |
Unless anyone objects, I see no issue with posting both links since they're both cached automatically. @Jamesking56 do you want me to close this out? Or is it cool to consider both? |
Agreed @JustinBeckwith, it can't hurt to list both. |
README.md
Outdated
Using jsDelivr CDN: | ||
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/axios@0.18.0/dist/axios.min.js" integrity="sha256-mpnrJ5DpEZZkwkE1ZgkEQQJW/46CSEh/STrZKOB/qoM=" crossorigin="anonymous"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By constraining to the version, its something else that has to be updated on every release, do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW SRI is an important security standard (just ask @KingstonTime @metromoxie & @freddyb) that Bootstrap updates each release.
Also, it is a horrible practice for those to use the latest
version which most green developers do and leave until a breaking change happens. They then go to Twitter, GitHub Issues and/or SO to complain how their site broke because...you get the point ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is, admittedly, a tricky balance, since you want to ensure that users are getting what they expect from the CDN, but you want to make sure that new users are getting up-to-date versions. I do think that Bootstrap strikes a good balance here by automating the <script> tag updates.
Additionally, if the concern is security fixes, I've heard of folks placing a warning in the console to alert devs of new versions and suggesting they upgrade. Per @jdorfman's point, it's always "fun" to have a "latest" version swap out from underneath you to a breaking change, so better to encourage folks to move to the newest version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if this link has a version, then the unpkg link should also include the version. It's odd if they are not linking to the same code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @styfle @Jamesking56 any thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with @styfle but we need an automated way to update the script tag per release then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we should be using SRI and constraining to a version in the README.md
unless we are prepared to update it at every release (hopefully automated). Otherwise we're instructing new users to download an older version.
I removed SRI, because it sounds like you don't want it there. |
@LukasDrgon Thank you, I think its best if you create a new issue regarding the SRI usage for both jsDelivr and Unpkg. Maybe lock them to a specific version of the package also? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍 - As discussed, new issue for version pinning and SRI.
I added a jsDelivr CDN link to your readme as an alternative to unpkg. jsDelivr is the fastest opensource CDN available and built specifically for production usage. It can serve any project from npm with zero config just like unpkg, but offers a larger network and better reliability. We also have detailed usage stats for project maintainers.