Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 813
Clay Nichols Avatar asked Aug 16 '16 22:08

Clay Nichols


People also ask

Does Font Awesome have a CDN?

Font Awesome CDN is the easiest way to get Font Awesome on your website or app, all with just a single line of code.

Does Font Awesome require JavaScript?

Font Awesome works well with Require. js, especially if you are using Web Fonts.


2 Answers

If you are using the free version of font-awesome, use cdnjs.

For pro users, Setup Webfont with CDN will provide insights on how to setup CDN with pro.fontawesome.com


#### Old Answer:

use.fontawesome.com is Font Awesome's own CDN.##

Heading

FontAwesome has its own paid option and analytics on usage provided by the CDN among many other features. Thats why they prefer thier own CDN for the end users.

like image 136
naveen Avatar answered Oct 16 '22 20:10

naveen


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.

like image 3
Derek Pollard Avatar answered Oct 16 '22 18:10

Derek Pollard