TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Cdnjs - the missing cdn

88 pointsby thomasdavisalmost 14 years ago

8 comments

overshardalmost 14 years ago
This seems to once again miss the point. The main point of a CDN is to speed up delivery of content. Having all of these different CDNs only increases the time it takes because you are adding in more DNS queries to the client and on top of that they are adding HTTPs support which even further increases load time because of the "handshake" that goes on. That being said, if this CDN is the only one you are using then great, that works out fine. But a CDN dedicated to only Javascript just seems kind of silly other than for passing aound example HTML files for how to code something.<p>EDIT: Also another pitfall is that you can't compress all your JS into one big JS file saving time on requests too.
评论 #2828714 未加载
评论 #2830110 未加载
评论 #2828910 未加载
评论 #2829212 未加载
评论 #2828758 未加载
评论 #2828743 未加载
pbreitalmost 14 years ago
Pro tip: leave off the protocol to support both http and https. Example:<p>&#60;script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.6.2/jquery.min.js"&#62;&#60;/script&#62;<p>Source: <a href="http://html5boilerplate.com/" rel="nofollow">http://html5boilerplate.com/</a>
评论 #2829057 未加载
评论 #2829406 未加载
phleetalmost 14 years ago
I might be alone here - but I would never use a CDN that isn't back by a company with a strong vested interest in preventing security breaches of their servers.<p>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.<p>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.
evmaralmost 14 years ago
Note that &#60;script src&#62;'ing from some random website means that site can XSS you any time it wants to. (I'm not saying the owners intend for this; a third party could just as well hack their site and do the same.)
nikcubalmost 14 years ago
you should host this on a separate domain because your clients are setting cookies on your domain and when I hit one of your hosted js files I see all of those cookies<p>for eg. I can see techcrunch and metric fuckton of google analytics cookies<p>separate this from the cloudfront clients or you have a potential security problem and a definite privacy breach
pbreitalmost 14 years ago
Kudos on the recently added https support. And on CloudFlare now (vs Amazon)...interesting.
评论 #2830094 未加载
rkallaalmost 14 years ago
Really like the idea of this community driven cdn.
ch0wnalmost 14 years ago
Are there any statistics regarding the reliability and speed from different locations?
评论 #2828681 未加载
评论 #2828737 未加载