Ask HN: CDN or npm?
Simple question: Suppose i'm going to use bootstrap, and I have to include it in my project.
It doesn't make any difference to me whether to use a cdn or npm.
Which should I use in your opinion?
It doesn't make any difference to me whether to use a cdn or npm.
Which should I use in your opinion?
1 comment
[ 0.19 ms ] story [ 9.5 ms ] threadConsider using Subresource Integrity [1][2] to pin a particular checksum to the particular version served from the CDN, for some extra assurance that the CDN is delivering correct file. This, of course, only works if you link to a static file that's unlikely to change, and not, say, 'bootstrap-latest.css'.
[1] https://www.w3.org/TR/2016/REC-SRI-20160623/
[2] https://www.w3.org/TR/2016/REC-SRI-20160623/#use-casesexampl...