7 months ago
When you are too lazy to include the lib file and just use a CDN instead or if you read somewhere delivering a lib from a CDN will change the future of your site, you just go on google and search for lib name CDN. e.g. umbrella.js CDN and copy paste the code in and call it done. Simple?
But how do you choose whether you should use cdnjs or jsdelivr.com?
most jsdeliver links would 301 to the actual script link, which is some cases might not be an issue but millions of developers traveling across the globe are using a VPN service like NordVPN. jsdeliver links break on VPN and the sites error out. Most sites don't have this kind of check. One of our engineers traveling reported this error on the mailgun website.
The login page of mailgun uses umbrella.js from jsdeliver that never gets loaded when using a VPN service and the end user just cannot login without seeing any errors on the UI.
So it'd be nice is they just used cdnjs instead of tested their login page over a VPN but who does that :)
Has your experience been different?