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.

CDN for JavaScript libraries

99 pointsby thefoxalmost 11 years ago

7 comments

thomasfromcdnjsalmost 11 years ago
Hey guys,<p>Thomas from cdnjs here, we have been on HN before.<p><a href="https://news.ycombinator.com/item?id=4412044" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4412044</a> - 671 days ago <a href="https://news.ycombinator.com/item?id=2828516" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=2828516</a> - 1057 days ago<p>cdnjs has been very successful since inception in early 2011, this is mainly due to Cloudflare&#x27;s early and ongoing sponsorship of the project.<p>According to BuiltWith, we have over 187,000 websites using cdnjs in production - <a href="http://trends.builtwith.com/cdn/CDN-JS" rel="nofollow">http:&#x2F;&#x2F;trends.builtwith.com&#x2F;cdn&#x2F;CDN-JS</a><p>According to w3techs, we have just recently overtook Microsoft&#x27;s cdn, which puts us in around third place for market size - <a href="http://w3techs.com/technologies/comparison/cd-cdnjs,cd-microsoftajax" rel="nofollow">http:&#x2F;&#x2F;w3techs.com&#x2F;technologies&#x2F;comparison&#x2F;cd-cdnjs,cd-micro...</a><p>jsbin, codepen and jsfiddle users generally use our tool for code snippets.<p>We have had no major downtime and only one brief security problem which was due to a library version which had insecure swf&#x27;s.<p>We have 100&#x27;s of developers contributing to the project, and our repository has become quite active - <a href="http://www.ohloh.net/p/cdnjs" rel="nofollow">http:&#x2F;&#x2F;www.ohloh.net&#x2F;p&#x2F;cdnjs</a><p>As always our thanks goes out to the community who help us keep the libraries up to date and Cloudflare&#x27;s dedication to speeding up the web. A special mention goes to Pete Cooper who has been the primary moderator and sole reason for our growth in the last 12 months - <a href="https://github.com/petecooper" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;petecooper</a><p>I will try to answer other questions in the thread today.<p>Edit: With regards to peoples privacy enquiries, because Cloudflare is our official mirror it is best to consult their privacy policy. I have been working with <a href="http://taskforce.is" rel="nofollow">http:&#x2F;&#x2F;taskforce.is</a> over the last year on campaigns against mass surveillance so I do take the issue very seriously.<p>Edit: Also a lot of users don&#x27;t use cdnjs in production, it&#x27;s just very convenient when developing to be able to quickly include scripts.<p>Atom Plugin - <a href="https://atom.io/packages/cdnjs" rel="nofollow">https:&#x2F;&#x2F;atom.io&#x2F;packages&#x2F;cdnjs</a> Sublime Plugin - <a href="https://github.com/dafrancis/Sublime-Text--cdnjs" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dafrancis&#x2F;Sublime-Text--cdnjs</a>
评论 #7933269 未加载
评论 #7931288 未加载
评论 #7933240 未加载
aw3c2almost 11 years ago
I see no privacy policy so you have to assume that they will log all they can about your visitors.<p>In these global dragnet surveillance ridden times it should be a no-brainer but please don&#x27;t expose your visitors to third-party websites, respect their privacy, host your assets yourself.
评论 #7931357 未加载
评论 #7931343 未加载
评论 #7931645 未加载
kirabalmost 11 years ago
Well, this also allows powerful actors to inject malicious code into your page. I think they can easily be forced via an NSL to target certain websites or client IPs.
评论 #7932176 未加载
kallebooalmost 11 years ago
So now the big question is... any reason to switch to this from googleapis.com? Short term loss in cacheablilty since the Google one is so widespread, long term less dependence on the Google corporation. Insecurity since CloudFlare seems like a prime target for an acquisition&#x2F;acquihire.
评论 #7931115 未加载
评论 #7931111 未加载
评论 #7931164 未加载
vijayaggarwalalmost 11 years ago
There are so may factors at play in determining the amount of gain from using such a service, e.g.,<p>1. How widespread the usage is. The more widespread it is, the better the chance of finding the resource in the browser cache itself, instead of having to make external request.<p>2. Geo distribution of resource by the CDN. The closer the nearest CDN server to the end user, the quicker the delivery.<p>3. Popularity of CDN domain used to serve the resource. Since a DNS request is potentially involved in fetching the resource, the domain name should be widely used to keep the DNS cachces warmed up.<p>I am especially skeptical towards adding DNS calls to my page. One for HTML and one-two for static resources is what I have seen works best in practice, especially with modern browsers that do not have the <i>two parallel downloads per domain</i> limit.
评论 #7931371 未加载
graystevensalmost 11 years ago
You can use <a href="http://www.cdnperf.com/" rel="nofollow">http:&#x2F;&#x2F;www.cdnperf.com&#x2F;</a> to figure out which may be best for your circumstances (lowest HTTPS latency, downtime etc.)
评论 #7931274 未加载
评论 #7931786 未加载
notastartupalmost 11 years ago
one major improvement of cdnjs would be where they allow a faster adding of libraries from websites such as unheap.com