You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/05/19 19:46:28 UTC
[GitHub] [incubator-mxnet] ys2843 opened a new issue #18367: Google JQuery CDN [https://ajax.googleapis.com] is banned in China
ys2843 opened a new issue #18367:
URL: https://github.com/apache/incubator-mxnet/issues/18367
## Description
In MXNet website, JQuery script is loaded from google CDN in `<head>`
```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
```
But this CDN is known banned in China, as you can see here:
+ [Similar Github issues on other website](https://github.com/kubeflow/website/issues/81)
+ [Things to Consider When Building a Website in China](https://www.labsterx.com/blog/things-to-consider-when-building-a-website-in-china-9-shtml/)
+ [Can webflow team replace “ajax.googleapis.com” with a reachable URL for China?](https://forum.webflow.com/t/can-webflow-team-replace-ajax-googleapis-com-with-a-reachable-url-for-china/29284)
It not only blocks website from loading, but also breaks all the interaction on MXNet website. (e.g. dropdown, installation guide, search etc. )
### Error Message
`ReferenceError: jQuery is not defined[Learn More]`
## Proposed solutions
We need to solve this problem so that users in China can visit MXNet website without any problem. Here are 3 solutions:
+ Use an alternative CDN as a backup, when google CDN fails load the resource from backup CDN , as discussed [in this question](https://stackoverflow.com/questions/1014203/best-way-to-use-googles-hosted-jquery-but-fall-back-to-my-hosted-library-on-go)(**Preferable**)
+ Replace google CDN by another CDN (**Not preferable**, google CDN works well in other countries only except China)
+ Hosting jQuery locally (**Not preferable** performance-wise, reasons can be found [here](https://meta.stackoverflow.com/questions/258288/use-of-ajax-googleapis-com-not-china-friendly) )
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] szha commented on issue #18367: Google JQuery CDN [https://ajax.googleapis.com] is banned in China
Posted by GitBox <gi...@apache.org>.
szha commented on issue #18367:
URL: https://github.com/apache/incubator-mxnet/issues/18367#issuecomment-631097651
@ys2843 thanks for sharing. Is the speed adequate for the items hosted locally with the website?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] ys2843 commented on issue #18367: Google JQuery CDN [https://ajax.googleapis.com] is banned in China
Posted by GitBox <gi...@apache.org>.
ys2843 commented on issue #18367:
URL: https://github.com/apache/incubator-mxnet/issues/18367#issuecomment-631044152
@mxnet-label-bot add [Website]
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] szha commented on issue #18367: Google JQuery CDN [https://ajax.googleapis.com] is banned in China
Posted by GitBox <gi...@apache.org>.
szha commented on issue #18367:
URL: https://github.com/apache/incubator-mxnet/issues/18367#issuecomment-631056893
jquery has its own CDN which isn't affected by the blocking of google CDN. so the simplest approach to try is to use that https://code.jquery.com/
could you summarize how the current website hosting works? to have more control on this we could use cloudfront, which can also improve stability.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] szha edited a comment on issue #18367: Google JQuery CDN [https://ajax.googleapis.com] is banned in China
Posted by GitBox <gi...@apache.org>.
szha edited a comment on issue #18367:
URL: https://github.com/apache/incubator-mxnet/issues/18367#issuecomment-631097651
@ys2843 thanks for sharing. Is the speed adequate for the items hosted locally with the website? If so, you may also consider simply downloading the uglified javascript file and include it with the website codebase.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] marcoabreu commented on issue #18367: Google JQuery CDN [https://ajax.googleapis.com] is banned in China
Posted by GitBox <gi...@apache.org>.
marcoabreu commented on issue #18367:
URL: https://github.com/apache/incubator-mxnet/issues/18367#issuecomment-631108556
Agree, I think replacing with jQuery CDN for now is the fastest and easiest way.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] ys2843 edited a comment on issue #18367: Google JQuery CDN [https://ajax.googleapis.com] is banned in China
Posted by GitBox <gi...@apache.org>.
ys2843 edited a comment on issue #18367:
URL: https://github.com/apache/incubator-mxnet/issues/18367#issuecomment-631106737
@szha It is hard to tell about the speed of hosting it locally with website. But currently there are complains about the loading speed (Avg 19s) of MXNet website from China. Although include it with website codebase is definitely the most reliable way.
I would say for now we replace google cdn with Jquery cdn first to fix this blocker bug, and I will do more research on CDN possible choices, and reach out to EChart to see their experience.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] sandeep-krishnamurthy commented on issue #18367: Google JQuery CDN [https://ajax.googleapis.com] is banned in China
Posted by GitBox <gi...@apache.org>.
sandeep-krishnamurthy commented on issue #18367:
URL: https://github.com/apache/incubator-mxnet/issues/18367#issuecomment-631063008
@ys2843 - Thanks for looking into this, is the jquery loading time causing huge delay in loading MXNet website in China?
I remember a ticket by @aaronmarkham for Apache Infra for CDN in China was closed. @szha - Is there a way to statically host in China?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] szha edited a comment on issue #18367: Google JQuery CDN [https://ajax.googleapis.com] is banned in China
Posted by GitBox <gi...@apache.org>.
szha edited a comment on issue #18367:
URL: https://github.com/apache/incubator-mxnet/issues/18367#issuecomment-631094530
ECharts project worked on CDN in China according to this board report: https://cwiki.apache.org/confluence/display/INCUBATOR/May2019
We may reach out to them for their experiences.
Update: in a later report they wrote: `Redirecting echarts.baidu.com to echarts.apache.org. Because we found some speed problem of Apache CDN in China, we haven't done the redirecting job yet. We will do more test and ask for help if necessary.`
Seems that using custom CDN is possible.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] ys2843 commented on issue #18367: Google JQuery CDN [https://ajax.googleapis.com] is banned in China
Posted by GitBox <gi...@apache.org>.
ys2843 commented on issue #18367:
URL: https://github.com/apache/incubator-mxnet/issues/18367#issuecomment-631096175
> jquery has its own CDN which isn't affected by the blocking of google CDN. so the simplest approach to try is to use that https://code.jquery.com/
>
> could you summarize how the current website hosting works? to have more control on this we could use cloudfront for static hosting, which can also improve stability.
Good idea, we could simply replace google CDN with `https://code.jquery.com/`, tested with Chinese servers and it is reachable, although it is slightly slower than local CDN, but it saves the fallback time.
Currently MXNet website hosting is handled by Apache Infra team, according to [Apache infra team:](https://issues.apache.org/jira/browse/INFRA-20203)
> MXNet is likely served from Japan for Chinese visitors.
We cannot at present get access to serve from China itself, the process for doing so is extremely convoluted due to Chinese government regulations. IF we are presented with an option that works in conjunction with MX records (aka not a CDN that relies on CNAME addresses), we will revisit our options and notify projects, but for the time being, we do not have any available options to speed up traffic for Chinese visitors.
Most of the resources are hosted locally with the website and the only thing not reachable is JQuery.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] szha edited a comment on issue #18367: Google JQuery CDN [https://ajax.googleapis.com] is banned in China
Posted by GitBox <gi...@apache.org>.
szha edited a comment on issue #18367:
URL: https://github.com/apache/incubator-mxnet/issues/18367#issuecomment-631094530
ECharts project worked on CDN in China according to this board report: https://cwiki.apache.org/confluence/display/INCUBATOR/May2019
We may reach out to them for their experiences.
Update: in [a later report](https://cwiki.apache.org/confluence/display/INCUBATOR/August2019) they wrote: `Redirecting echarts.baidu.com to echarts.apache.org. Because we found some speed problem of Apache CDN in China, we haven't done the redirecting job yet. We will do more test and ask for help if necessary.`
Seems that using custom CDN is possible.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] szha closed issue #18367: Google JQuery CDN [https://ajax.googleapis.com] is banned in China
Posted by GitBox <gi...@apache.org>.
szha closed issue #18367:
URL: https://github.com/apache/incubator-mxnet/issues/18367
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] szha commented on issue #18367: Google JQuery CDN [https://ajax.googleapis.com] is banned in China
Posted by GitBox <gi...@apache.org>.
szha commented on issue #18367:
URL: https://github.com/apache/incubator-mxnet/issues/18367#issuecomment-631094530
ECharts project worked on CDN in China according to this board report: https://cwiki.apache.org/confluence/display/INCUBATOR/May2019
We may reach out to them for their experiences.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] szha edited a comment on issue #18367: Google JQuery CDN [https://ajax.googleapis.com] is banned in China
Posted by GitBox <gi...@apache.org>.
szha edited a comment on issue #18367:
URL: https://github.com/apache/incubator-mxnet/issues/18367#issuecomment-631056893
jquery has its own CDN which isn't affected by the blocking of google CDN. so the simplest approach to try is to use that https://code.jquery.com/
could you summarize how the current website hosting works? to have more control on this we could use cloudfront for static hosting, which can also improve stability.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] ys2843 commented on issue #18367: Google JQuery CDN [https://ajax.googleapis.com] is banned in China
Posted by GitBox <gi...@apache.org>.
ys2843 commented on issue #18367:
URL: https://github.com/apache/incubator-mxnet/issues/18367#issuecomment-631106737
@szha It is hard to tell about the speed of hosting it locally with website. But currently there are complains about the loading speed (Avg 19s) of MXNet website from China. Although include it with website codebase is definitely the most reliable way.
I would say for now we replace google cdn with Jquery cdn first to fix this blocker bug, and I will do more research on CDN possibility, and reach out to EChart to see their experience.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] sandeep-krishnamurthy edited a comment on issue #18367: Google JQuery CDN [https://ajax.googleapis.com] is banned in China
Posted by GitBox <gi...@apache.org>.
sandeep-krishnamurthy edited a comment on issue #18367:
URL: https://github.com/apache/incubator-mxnet/issues/18367#issuecomment-631063008
@ys2843 - Thanks for looking into this, is the jquery loading time causing huge delay in loading MXNet website in China?
I remember a ticket by @aaronmarkham for Apache Infra for CDN in China was closed. @szha - Is there a way to statically host in China and how to overcome with Apache processes?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org