ox-it / OxfordIDN_htmlwidgets

Interactive visualisation templates with htmlwidgets and R
http://ox-it.github.io/OxfordIDN_htmlwidgets/
MIT License
3 stars 6 forks source link

Description of loading JQuery from CDN needs improvement #39

Open ToonTalk opened 7 years ago

ToonTalk commented 7 years ago

Regarding

In the explicit case of jquery, the following code can be used to load the local resource if the CDN is unavailable:

Need to explain why one would want to do this. And if you give a specific version number then I'm not sure what the advantage is over using the local copy (other than it might be cached and hence save the downloading cost (which is trivial in this case)). Maybe make this example consistent with the jquery.min.js example that precedes it.

Also your script will download it from /js/jquery instead of shared/jquery.min.js

charliejhadley commented 7 years ago

Ken made a good point in meatspace that any shiny app will be pulling from the US and not using a closer CDN. A hat tip to this would be worth making, and if providing a visualisation service with a privately hosted Shiny Server (Pro), how might one attempt to resolve this?

charliejhadley commented 7 years ago

Ken also advised in meatspace that in JS it is best to use === and not == for equivalence testing