Provide local fallback for CSS from CDN
Posted
by
BadHorsie
on Stack Overflow
See other posts from Stack Overflow
or by BadHorsie
Published on 2013-07-02T23:01:07Z
Indexed on
2013/07/02
23:05 UTC
Read the original article
Hit count: 220
I'm loading the Bootstrap CSS on my page from the CDN bootstrapcdn.com
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet">
How can I test if the stylesheet was loaded, and if not provide a local fallback?
I do not want to wait for jQuery or other libraries to load before doing the test; I want all CSS to be loaded on the page first.
© Stack Overflow or respective owner