javascript - CDN fallback for fontawesome CSS -
does have solution falling local copy of fontawesome if cdn blocked or unavailable?
for bootstrap css following:
if ($('body').css('color') !== 'rgb(51, 51, 51)') { $('<link rel="stylesheet" type="text/css" href="/css/bootstrap/3.2.0/bootstrap.min.css">').prependto('head'); } however don't see how can fontawesome can't see test?
i guess can ajax request , detect 404 - mean css transfered twice on every request?
if want check same way bootstrap, check if element class .fa has property font-family: fontawesome; property set fontawsome.css loaded cdn.
Comments
Post a Comment