Skip to content
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

Switch default cdn from unpkg to jsdelivr #1627

Closed
mlucool opened this issue Aug 14, 2017 · 19 comments · Fixed by #3121
Closed

Switch default cdn from unpkg to jsdelivr #1627

mlucool opened this issue Aug 14, 2017 · 19 comments · Fixed by #3121

Comments

@mlucool
Copy link
Contributor

mlucool commented Aug 14, 2017

In case someone is having issues, there is a critical regression with unpkg: mjackson/unpkg#51

@jasongrout
Copy link
Member

Is this why I'm seeing errors loading fontawesome? Other than that, are there other places you see errors from this?

@jasongrout jasongrout added this to the Reference milestone Aug 14, 2017
@MartinKolarik
Copy link

@jasongrout yes, it affects all links with a query string, font awesome is one of them.

If you'd like, you are welcome to use jsDelivr CDN, which works in a similar fashion but is strongly focused on production usage and never breaks any existing links.

@jasongrout
Copy link
Member

jasongrout commented Aug 14, 2017

Thanks, we'll take that into consideration. As you can probably guess, we are extremely conservative in choosing a CDN to be used in our official sources.

Checking into jsdelivr...

@MartinKolarik
Copy link

As you can probably guess, we are extremely conservative in choosing a CDN to be used in our official sources.

That makes sense 😄 let me know if you have any questions or need help... jsDelivr serves more than 10 times the traffic of unpkg so I'm sure it would work for you as well.

@jasongrout
Copy link
Member

Thanks! Yes, I'm seeing lots of positive things about jsdelivr as I look around. And I suppose any hesitation about security is resolved by using SRI more consistently.

@MartinKolarik
Copy link

Yes, we're very serious about security too, but SRI definitely helps in that regard.

@jasongrout
Copy link
Member

More background: it seems that jsdelivr was not an option when we were looking for CDNs last, but in May implemented the automated npm CDN part we wanted from unpkg: jsdelivr/jsdelivr#13136

It does seem to me that it makes sense to switch to jsdelivr, given that unpkg is having issues, jsdelivr is more mature and (according to the above and other info I'm finding) serves much more traffic, and given the problem above.

@SylvainCorlay, @maartenbreddels, @pbugnion, @mwcraig, @vidartf - do any of you have opinions about switching from unpkg.com to jsdelivr for our hardcoded CDN? It'd basically just be switching the domain name, as the URLs and features are essentially equivalent.

@maartenbreddels
Copy link
Member

No objections, I'd say if we need to switch the time is now.

@jasongrout
Copy link
Member

jasongrout commented Aug 15, 2017

I'm testing again to see if the fontawesome on unpkg is still causing problems.

@mwcraig
Copy link
Contributor

mwcraig commented Aug 15, 2017 via email

@SylvainCorlay
Copy link
Member

Same. unpkg is supported by a large organization though.

@jasongrout
Copy link
Member

Same. unpkg is supported by a large organization though.

Where do you see that? I don't see it on https://unpkg.com/#/about (other than donations of services).

In any case, jsdelivr's sponsor list is also pretty impressive: http://www.jsdelivr.com/about

@jasongrout
Copy link
Member

jasongrout commented Aug 15, 2017

I'm testing again to see if the fontawesome on unpkg is still causing problems.

I saw problems with fontawesome at some point, but I don't see problems now - possibly because we've rewritten how the embedding works. Now, we directly reference fontawesome fonts served up as part of the html-manager /dist assets, and there is no ?v parameter, just a version number for the html manager.

So this doesn't seem to be the problem that I thought it was. Given our proximity to a release, I now recommend we take a look at this after our release, if we want to switch to jsdelivr because of a bigger network, etc.

@maartenbreddels
Copy link
Member

👍

@jasongrout jasongrout changed the title Unpkg Regression Switch cdn from unpkg (maybe jsdelivr?) Sep 5, 2017
@tarzzz
Copy link
Contributor

tarzzz commented Aug 23, 2018

(I can move it into its own issue if it is unrelated):

Does it makes sense to be able to set custom CDN (in the form of an environment variable)?

We have a use case where we need to run the notebooks behind a proxy. Making the CDN configurable will be helpful in ensuring that the widgets work behind the network, where requesting resources from unpkg.com is not feasible.

I am happy to do the work needed to get this implemented in ipywidgets.

@jasongrout
Copy link
Member

I think now is a good time to switch the default to jsdelivr for ipywidgets 8.0

@jasongrout jasongrout changed the title Switch cdn from unpkg (maybe jsdelivr?) Switch default cdn from unpkg to jsdelivr Jan 14, 2020
@mlucool
Copy link
Contributor Author

mlucool commented Jan 14, 2020

Does it makes sense to be able to set custom CDN (in the form of an environment variable)?

This would be helpful as part of this work.

@jasongrout
Copy link
Member

Does it makes sense to be able to set custom CDN (in the form of an environment variable)?

This would be helpful as part of this work.

That is already done and released in #2185.

@jasongrout
Copy link
Member

jasongrout commented Feb 16, 2021

As an update, it appears that jsdelivr is still much larger than unpkg (like 4x more websites). jsDelivr has also apparently been chosen to be the cdn for bootstrap. All in all, I think it's still a good choice to migrate to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants