Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRobert Mylne
13,708 PointsBootstrap CDN
I am watching the video add bootstrap css, in the video Zac adds this to the theme folder. But you can also use a CDN I know the advantage to the CDN is that it may already be in the users cache from visiting another site. But is there any disadvantage to doing it this way?
3 Answers
Steven Byington
13,584 PointsThe main things that can affect your site if using a CDN are not being able to customize the file (although I don't don't know why you would) and the chance of the CDN going down (which most likely won't happen depending on who is hosting). The advantages definitely outweigh the disadvantages though.
Bryan Lusica
5,971 PointsThere are some disadvantage of loading from CDN network.
- You cannot verify the best location of the file.
- You cannot easily maintain the files.
- Its impractical. Unless you are hosted files that you want anybody can grab it.
- If ever the Network fails, you cannot fix it.
Liz Pineda
2,254 PointsHow do you include a CDN in the wordpress project?
Nijad Kifayeh
6,092 Pointsfrom the bootstrap site you can get the link to their CDN..then just post that location into the wp_enqueue_style() function as you would the location for the local bootstrap.css file.