If anyone still needs convincing these CDN'd JS lib are a bad design pattern, check out this presentation from 2012's Black Hat (and also DEFCON) on MITM attacks on them that persist after the user has been exposed (due to indefinite caching of poisoned JS files). http://media.blackhat.com/bh-us-12/Briefings/Alonso/BH_US_12... , or https://www.youtube.com/watch?v=ZCNZJ_7f0Hk (quite entertaining presentation) the tl:d…
How often does your average user browse via an anonymous proxy? I doubt most would even know what the hell you are talking about. I can understand for your more clued up or power user, but you give the average user too much credit.
Microsoft's Ajax CDN tumbles worldwide
31–40 of 46 posts
Re: Microsoft's Ajax CDN tumbles worldwide
#32Earlier quoted context omitted.
How often does your average user browse via an anonymous proxy? I doubt most would even know what the hell you are talking about. I can understand for your more clued up or power user, but you give the average user too much credit.
Every time they use a public wifi hotspot. Any time you use a network you don't control and where you have no reason to trust the admin, you may as well be using a proxy. The requirement to trust the admin isn't about the admin MITMing you, but rather trusting their competency in preventing other users MITMing you. Of course the admin could be bad as well.
Re: Microsoft's Ajax CDN tumbles worldwide
#33Earlier quoted context omitted.
This is what we had, but it wasn't responding quickly enough, so the site was hanging despite the fallback.
You could probably wire something up in JS to handle it with reduced timeouts, e.g. an AJAX call that automatically fails after 50-100ms and proceeds to load the local version.
Re: Microsoft's Ajax CDN tumbles worldwide
#34Earlier quoted context omitted.
How often does your average user browse via an anonymous proxy? I doubt most would even know what the hell you are talking about. I can understand for your more clued up or power user, but you give the average user too much credit.
Every time they use a public wifi hotspot. Any time you use a network you don't control and where you have no reason to trust the admin, you may as well be using a proxy. The requirement to trust the admin isn't about the admin MITMing you, but rather trusting their competency in preventing other users MITMing you. Of course the admin could be bad as well.
Re: Microsoft's Ajax CDN tumbles worldwide
#35Earlier quoted context omitted.
I agree completely that your average website will have less uptime than the CDN. The problem isn't that the CDNs are less reliable, it's that it's VERY unlikely that your site will experience downtime at the same time as the CDN. This means your site reliability is the combination of the downtime of the CDN as well as your own.
Yeah, but if you gracefully handle those failures with local fallbacks, then the CDN's downtime is a moot point.
If you are going to have a fallback, and that fallback may take seconds to activate if the CDN is down, why not just make the fallback your primary?
Re: Microsoft's Ajax CDN tumbles worldwide
#36Earlier quoted context omitted.
Every time they use a public wifi hotspot. Any time you use a network you don't control and where you have no reason to trust the admin, you may as well be using a proxy. The requirement to trust the admin isn't about the admin MITMing you, but rather trusting their competency in preventing other users MITMing you. Of course the admin could be bad as well.
Any time you browse via public wifi you might be being fucked with. How often are you actually? My wager, depending on setting, very rarely.
In the cafe on the corner of your block in syria, iran and similar places though, the odds are a lot better.
Re: Microsoft's Ajax CDN tumbles worldwide
#37Earlier quoted context omitted.
Don't use unescape, is ugly and is not required if you break the close tag of "script". this.jQuery||document.write(' ')
Yes, also document.write('\x3Cscript>\x3C/script>'). But these are beside the point.
Re: Microsoft's Ajax CDN tumbles worldwide
#38Earlier quoted context omitted.
You could probably wire something up in JS to handle it with reduced timeouts, e.g. an AJAX call that automatically fails after 50-100ms and proceeds to load the local version.
A simpler solution would be to reload the page passing a parameter that you want to use other CDN; something like this: https://gist.github.com/4444636
A simple solution would be to just link to a self-hosted version of the lib.
Re: Microsoft's Ajax CDN tumbles worldwide
#39Earlier quoted context omitted.
A simpler solution would be to reload the page passing a parameter that you want to use other CDN; something like this: https://gist.github.com/4444636
You've now got people wondering why their page just reloaded after half a second and a slug of unnecessary javascript in your page all for the sake of simplicity. A simple solution would be to just link to a self-hosted version of the lib.
Re: Microsoft's Ajax CDN tumbles worldwide
#40Earlier quoted context omitted.
Every time they use a public wifi hotspot. Any time you use a network you don't control and where you have no reason to trust the admin, you may as well be using a proxy. The requirement to trust the admin isn't about the admin MITMing you, but rather trusting their competency in preventing other users MITMing you. Of course the admin could be bad as well.
Yay for never using public wifi hotspots, now if I could only impress that upon the millions of Americans who do so everyday...