Bootstrap and JQuery CDNs Down in UK, France(check-host.net)
check-host.net
Bootstrap and JQuery CDNs Down in UK, France
http://check-host.net/check-report/4d9642
5 comments
I have to say as unpopular an opinion as it seems to be I have always stuck to keeping local copies of my core libraries hosted on my server. I know all of the benefits of pulling from a central CDN like Google but I still can't get over the fear of being dependent on an external source for part of my core functionality.
Best of both worlds:
<script src="//example.cdn.com/jquery.min.js"></script> <script>window.jQuery || document.write('<script src="scripts/jquery.min.js"><\/script>') </script>
<script src="//example.cdn.com/jquery.min.js"></script> <script>window.jQuery || document.write('<script src="scripts/jquery.min.js"><\/script>') </script>
Perhaps a deamon on your server that pings the cdn every minute and checks whether it's down?
If it is, you can flip a switch that tells the code to use the local repositories until the service is back up.
If it is, you can flip a switch that tells the code to use the local repositories until the service is back up.
Argh, No!
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.
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.
and what about CSS? the link in the initial post shows that CSS is not available via CDN, not JS
I have my own mix of 3rd party libraries I need for my application to run (Bootstrap, JQuery, Lodash, Flot, JQuery-Download, Markdown, etc), it is a large set, but I'm writing a multimedia application!!! Anyway, I find more value in doing my own combining and minification of those dependencies, as opposed to grabbing them individually from 3rd party servers. So my typical page loads with 3 javascript files and one css file.
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.
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.
Why can't we have both?[0]
I'm curious to know if there are any drawbacks to the approach in the linked article.
[0] http://www.hanselman.com/blog/CDNsFailButYourScriptsDontHave...
I'm curious to know if there are any drawbacks to the approach in the linked article.
[0] http://www.hanselman.com/blog/CDNsFailButYourScriptsDontHave...
and what about CSS? the link in the initial post shows that CSS is not available via CDN, not JS [0]
[0] https://news.ycombinator.com/item?id=8552139
[0] https://news.ycombinator.com/item?id=8552139
This article[0] looks like it supports both (after a cursory glance):
[0] http://eddmann.com/posts/providing-local-js-and-css-resource...
[0] http://eddmann.com/posts/providing-local-js-and-css-resource...
What are those benefits of pulling from a central CDN? I've never understood that, and always hated the idea of yet another point of failure. Especially for something so easy to host yourself.
This sums it up nicely:
http://encosia.com/3-reasons-why-you-should-let-google-host-...
http://encosia.com/3-reasons-why-you-should-let-google-host-...
I know the theoretical reasons, but I'm not sure it makes such a big difference in practice.
If everyone references the CDN copy, then most clients will already have the library cached and don't have to download it separately.
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.
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.
The cache-sharing other users are citing is useful, but ultimately not the most-useful part. The most useful feature is the fact that, given tons of sites are now serving global audiences, you as the site owner/administrator no longer have to deal with provisioning servers to datacenters or infrastructure of any sort (for these static resources) nearer to your customers. If you optimize by putting all of these external links into <head> and shipping that bit of your page out earlier than it takes to generate the rest of the page, you'll see pretty solid performance gains for anyone not where YOU are (near your likely us/eu based servers). At some point in optimization the speed of light becomes the hard barrier, and not caching concerns.
Supposedly it's because many sites use jQuery et al so it's already cached in the user's browser. In reality minified bootstrap & jquery scripts/css combined is usually faster than the rest of the site to load anyway, no big deal to just host it locally
Can someone ELI5 why the following doesn't exist (or please enlighten me if it does):
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.
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.
I did that, with an inline document.write , a technique I got from html5 boilerplate.
something like
something like
if(!jQuery){document.write('<script>...');}Weird http://code.jquery.com/ appears to be down for me too
o_O - it looks like MaxCDN is having a widespread failure of some kind. I was VPN'd through Ireland so didn't notice.
A lot of the web is currently without styles or scripts!
Edit: added to title. Thanks!
A lot of the web is currently without styles or scripts!
Edit: added to title. Thanks!
Time to switch a few services from CDN to local copies ...
Is there any way to failsafe for events like this?
https://news.ycombinator.com/item?id=8552005 seems to present a solution, which works but may timeout slowly and doesn't handle Byzantine failure (hopefully unlikely)
It works now.
Looks like it, yup - though http://status.maxcdn.com/ is now orange (wasn't earlier). Some updates to come, I imagine. :)
> All traffic has been re-routed to nearby locations
> All traffic has been re-routed to nearby locations