Bootstrap and JQuery CDNs Down in UK, France
check-host.net
check-host.net
Personally, I self-host every dependency I possibly can, specifically because I don't want my website's functionality, performance, or security to depend on a third party insofar as I possibly can.
http://encosia.com/3-reasons-why-you-should-let-google-host-...
<script src="//example.cdn.com/jquery.min.js"></script> <script>window.jQuery || document.write('<script src="scripts/jquery.min.js"><\/script>') </script>
That assumes there's a clean fail on the initial request for jQuery i.e. it returns a HTTP error.
What happens when the webserver just doesn't respond? DOM construction is just going to wait until the browser times the connection out before it starts to download the fall back (know as a 3rd Party SPOF)
The time out is 30 seconds plus so essentially the page is broken from the user perspective.
If it is, you can flip a switch that tells the code to use the local repositories until the service is back up.
Also, I've had to work in corporate environments where they would only let VERY specific IP addresses into their network. Javascript files on Google's CDN would routinely get blocked as Google changed IP addresses.
Now I host everything myself and I haven't had an issue.
I'm curious to know if there are any drawbacks to the approach in the linked article.
[0] http://www.hanselman.com/blog/CDNsFailButYourScriptsDontHave...
[0] http://eddmann.com/posts/providing-local-js-and-css-resource...
Some kind of asset management package that will pull a javascript or CSS file from a CDN if that CDN is alive. If it isn't then it can fallback to redundancy locations (maybe 2 more CDNs before requesting the asset off your own server which would act as a last-resort redundancy).
Is this possible? I imagine it could be implemented via JS.
something like
if(!jQuery){document.write('<script>...');}A lot of the web is currently without styles or scripts!
Edit: added to title. Thanks!
> All traffic has been re-routed to nearby locations