Cdnjs - the missing cdn
cdnjs.com
cdnjs.com
EDIT: Also another pitfall is that you can't compress all your JS into one big JS file saving time on requests too.
It's a must have.
And so that, yunno, you don't compromise the entire page making the use of HTTPS completely worthless.
As the number of SPA-type "sites" grows, the ratio tilts towards JS and dynamic communications (XML, JSON, etc...). Though overall I don't think it matters much.
A more interesting (I think) potential effect, should a given CDN reach a significant hold of the overall serving market, is the likelihood of a cache hit for the relevant library.
When you say "all these misc CDNs" you're talking about just one, CDNjs, right?
I suppose the CDN could host other assets if it made sense. But I can't think of any other assets with the type of commonality that JavaScript libs have.
I would find this somewhat surprising given the increased use of hosted DNS providers for both authoritative and recursive. Can you point to any data that corroborates this (not saying it isn't true, just looking for hard data)?
http://199.27.135.101/ajax/libs/prototype/1.7.0.0/prototype....
CloudFlare doesn't seem to support direct access based on IP, but there's no reason it couldn't, right? Do browsers support this?
While it may be possible to create a IP-based CDN, my guess is the tradeoffs in terms of not being able to thoroughly defend yourself against attacks would not be worth the few milliseconds saved on the initial DNS lookup.
A (good) CDN speeds up content by having distribution points close to the client. An added benefit of a shared CDN (like this) is that resources can be shared by multiple pages, which will mean the cache will be shared by multiple pages. DNS lookup can be a factor in page load time, but parallelizable HTTP requests (especially to a location that is close by) can usually make up for it.
Google's recommendation is to use between 1 and 5 hosts per page: http://code.google.com/speed/page-speed/docs/rtt.html#Minimi.... For the type of clients this CDN is aimed at (people who don't have their own CDN) it is unlikely they have more than one or two hosts already used, so this CDN is likely to be useful for them.
HTTPS support is required for domains served over HTTPS. If you aren't using HTTPS then don't use it.
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
Source: http://html5boilerplate.com/
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com">
Consider that the community CDN is compromised - if that file gets replaced with a different JS file, you've now provided an attacker an XSS hole into _every_ page using the CDN.
I have a reasonable trust in Google to secure their own servers against such a compromising attack, but have no similar reason to put faith in smaller companies/services.
for eg. I can see techcrunch and metric fuckton of google analytics cookies
separate this from the cloudfront clients or you have a potential security problem and a definite privacy breach
Pingdom stats