Title: CDN Fallback
Last modified: August 21, 2016

---

# CDN Fallback

 *  Resolved [mascatu](https://wordpress.org/support/users/mascatu/)
 * (@mascatu)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/cdn-fallback/)
 * Hi,
    First I just want to tell you plugin is by far one of my most favorite plugins
   of all time 🙂 Big Congrats!
 * I know you load FontAwesome using NetDNA’s Bootstrap CDN service to makes icons
   load faster. But…
    I have two questions:
    1. I’ve just notice that if a theme already use the font FontAwesome using wp_enqueue_style,
       in the page source code I see FontAwesome stylesheet loading twice, one from
       plugin and one from the theme itself. This may affect in any way the speed of
       loading the theme? Can this be avoided in any way?
    2. In cases where CDN are blocked or unavailable, is there a way to automatically
       load local the files as fallback assuming that I have already a local copy of
       FontAwesome files in my theme root? Basically I need a code to confirm that 
       cdn script loaded by checking for existence of a variable/function the FontAwesome
       defines and if it is undefined then automatically load a local FontAwesome files
       copy. I hope I was well enough understood. Can you help me with this piece of
       code? Thanks!
 * Best
 * [https://wordpress.org/plugins/menu-social-icons/](https://wordpress.org/plugins/menu-social-icons/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [mascatu](https://wordpress.org/support/users/mascatu/)
 * (@mascatu)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/cdn-fallback/#post-4800197)
 * willing to pay for it 🙂
 *  Plugin Author [pdclark](https://wordpress.org/support/users/pdclark/)
 * (@pdclark)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/cdn-fallback/#post-4800250)
 * Hi Mascatu,
 * In answer to your questions:
 * 1. You can disable the style for FontAwesome loaded by Menu Social Icons with
   the code in this thread: [https://wordpress.org/support/topic/dont-use-cdn](https://wordpress.org/support/topic/dont-use-cdn)
 * 2. While you can replace the CDN version of FontAwesome with your own server’s
   version by combining the code above with your own [wp_enqueue_script](http://codex.wordpress.org/Function_Reference/wp_enqueue_script)
   call pointing to your local version, combining the two is very technically difficult,
   and generally unnecessary. Generally speaking, a CDN will be faster and more 
   reliable than your server.
 * Paul
 *  Thread Starter [mascatu](https://wordpress.org/support/users/mascatu/)
 * (@mascatu)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/cdn-fallback/#post-4800251)
 * Thank you Paul,
    1. I solved this by creating a simple [plugin](http://wordpress.org/plugins/dequeue-font-awesome/)(
       under another username) so no matter how plugins that uses Font Awesome are 
       active, FA is loaded only once.
    2. I’ve posted a question on [WP stackexchange](http://wordpress.stackexchange.com/questions/142241/how-to-provide-a-local-fallback-for-font-awesome-if-cdn-fails)
       and the answer cleared me completely.
 * Best

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘CDN Fallback’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/menu-social-icons_ffffff.svg)
 * [Menu Social Icons](https://wordpress.org/plugins/menu-social-icons/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/menu-social-icons/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/menu-social-icons/)
 * [Active Topics](https://wordpress.org/support/plugin/menu-social-icons/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/menu-social-icons/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/menu-social-icons/reviews/)

## Tags

 * [cdn](https://wordpress.org/support/topic-tag/cdn/)

 * 3 replies
 * 2 participants
 * Last reply from: [mascatu](https://wordpress.org/support/users/mascatu/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/cdn-fallback/#post-4800251)
 * Status: resolved