0

I want to use this Javascript from Github:
https://github.com/evanplaice/jquery-csv/blob/master/src/jquery.csv.min.js

I didn't want to work out some wacky solution when I know there is probably a simple way to do this.

So I am hoping there is a way I can reference this in a <script src= ??? ></script> in my html, just like I would reference anything off Google CDN.

kpie
  • 9,588
  • 5
  • 28
  • 50
  • 1
    download it and reference it... – johnny 5 Mar 18 '16 at 14:07
  • 2
    Possible duplicate of [Should Github be used as a CDN for javascript libraries?](http://stackoverflow.com/questions/5502540/should-github-be-used-as-a-cdn-for-javascript-libraries) – Sam Hanley Mar 18 '16 at 14:31

2 Answers2

4

You don't. GitHub is not a CDN. Do not (try to) use it as such. Download the file and use it locally.

Bram Vanroy
  • 27,032
  • 24
  • 137
  • 239
  • Are you telling me that if I do work out a hacky solution github is going to blacklist all my users? I don't think so. – kpie Mar 18 '16 at 14:12
  • Here's a related (albiet closed) question that goes more into *why* this is a bad idea, if you're interested: http://stackoverflow.com/questions/5502540/should-github-be-used-as-a-cdn-for-javascript-libraries – Sam Hanley Mar 18 '16 at 14:27
  • And as to your question, @kpie: as per [this blog post](https://github.com/blog/1482-heads-up-nosniff-header-support-coming-to-chrome-and-firefox), the answer is yes, GitHub actively tries to block your ability to do this because it is a bad idea and should not be done. – Sam Hanley Mar 18 '16 at 14:29
0

I'm not suggesting this is a good idea, but you can try RawGit.

André Dion
  • 21,269
  • 7
  • 56
  • 60