Ask coding questions

← Back to all posts
What should I use for my cdn?
IntellectualGuy (822)

So as you might know there are many places you can get cdns from like google and cdnjs, but which one is the best for someone new to JavaScript?

Answered by EpicGamer007 (1765) [earned 5 cycles]
View Answer
EpicGamer007 (1765)

what do you mean? Do you mean which cdns are the best to use or where is the best place to host your javascript?

EpicGamer007 (1765)

if you want to host your own, you can just use replit. but if you dont want to use replit, you can use an option from this list or any other provider.

If you are wondering which cdn is the best to use, it would probably be your own. by that, i mean copying the scripts into your project directory and referencing that rather than a cdn. this means if for some reason a hacker gets into a cdn and makes the code faulty, it wont make your code faulty. However, if you want to use a cdn, the best option would probably be cdnjs. If you want nodejs js files, you can try UNPKG.

IntellectualGuy (822)

@EpicGamer007 Sorry If I wasn't clear I meant that I'm using three.js so I was wondering which cdn is the best to import it.