Search code examples
javascriptfont-awesomecdn

Why does FontAwesome recommend including via a .js script instead of a CDN link?


I was looking for a CDN to link to for FontAwesome. Their website instead provides a .js link (rather than using, for instance, this Open Source CDN I found)

Does it check the link (or maybe try several) to the CDN?


Solution

  • It looks like from deobfuscating and quickly skimming through the JS file that it is a "1 and done" type of solution, meaning:

    It loads the necessary CSS, sets the font type for the images, and also does some sort of reporting on who is using their stuff.

    It also looks like it might bind their icons to the use of fa within a class

    It doesn't really look like there is an obvious advantage to using the .js file over the CDN.