TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Tell HN: Catalog of JavaScript libraries and CSS resources hosted on public CDNs

80 点作者 andrewdavey大约 15 年前

10 条评论

MicahWedemeyer大约 15 年前
Correct me if I'm wrong, but the high speed of the CDN isn't the only (or even primary) benefit. In my opinion, browser caching is a much bigger plus. As soon as a user downloads one of these hosted libraries (by visiting a site that calls for it), their cache is primed for every other relying site they visit. Correct?<p>Assuming this is true, why would someone use the Google API Loader javascript call ("google.load") instead of linking to the file directly? Linking directly allows the browser to use its cache, while using google.load needs to make an external call to Google, bypassing a big benefit of the caching.
评论 #1157731 未加载
评论 #1158593 未加载
ig1大约 15 年前
You need to be careful about user privacy with things like this. You're leaking user information to third party services, and you need to make this clear to your users, especially if you're dealing with anything that could be considered at all sensitive.
评论 #1157532 未加载
评论 #1157469 未加载
评论 #1157451 未加载
评论 #1157453 未加载
shrike大约 15 年前
Is it really faster? I always assumed that the additional client side DNS lookup would eliminate the increased bandwidth advantage that the CDNs have. Anybody know if anyone has A/B tested this?
评论 #1158406 未加载
评论 #1158171 未加载
sh1mmer大约 15 年前
FYI Yahoo still maintain their own CDN for YUI which has additional features such as submodule selection, so you can roll a package that fits you, and we'll host it.<p>Disclaimer: I work for Y!
invisible大约 15 年前
Google went down one day and all of these CDNs stopped working at our colo. We got over 50 calls of people complaining their sites were down. Turns out the sites were blocking on waiting for the javascript (timing out after a few minutes).<p>That is the only time it has happened, but this is what makes me fear being fully dependent on these CDNs. So be advised: add a fallback mechanism.
brandon272大约 15 年前
The caching aspect is one pro to using these services, but by using these CDN's, your exposure to failure is greatly increased. Instead of factoring in the risk that your own server or network may be unavailable or slow, you now need to account for 1, 2 or 3 other networks that you are grabbing files from.
评论 #1157909 未加载
prodigal_erik大约 15 年前
Doesn't this prevent anyone from whitelisting your code in NoScript? As a user, how could I ever know that you've reviewed what the CDN is serving right now? ECMAScript sandboxes are not nearly good enough yet to run untrustworthy code.
vladocar大约 15 年前
I really need something like this for my CSS Frameworks. Fast DNS query resolving + gzip.<p>I think that Google and others(Microsoft,Yahoo) should give free access for more public libraries. So we can all benefit from that.
timmorgan大约 15 年前
Thanks! Good to know, even if I may end up copying the files to my own server anyway.<p>Edit: I assume the plan is to keep this list updated with the latest version of each lib. (?)
评论 #1157450 未加载
sidbatra大约 15 年前
This is <i>really</i> helpful for a lean startup. Helps pull some load away from servers and you get all the benefits of a CDN and caching.