Live data from Hacker News

Cdnjs - the missing cdn

cdnjs.com

41–50 of 79 posts

Re: Cdnjs - the missing cdn

#44
post #18

Earlier quoted context omitted.

The idea is that users wouldn't have to download the same jquery or whatever script over and over for every site they visit. It makes less sense when it comes to not-so-popular script files, but I guess there's a convenience factor too.

We need to extend the baseline notion of what the web is. If some nontrivial number of sites are using (say) jQuery, then it would be a good idea to have a way to declare "SCRIPT SRC jQuery version x.y.z" and let the browser figure out where it lives. Then you fetch it once, parse it once, and run it many times, no matter what site you may be visiting. Or at the very least, we need some way to say "get this script fr…

It seems to me that the best way to handle this would be a content-addressable system with a more traditional fallback. You'd declare that you want file with SHA-256 (or whatever) hash of XYZ. If the browser has it, then you're done. If the browser knows where to find XYZ, then it can go off and grab it however it feels like. For compatibility, you'd also specify one or more traditional URLs where you think that content XYZ can be found, and the browser could use the hash to verify integrity.

The trouble with the current CDN setup is that you only get the maximum benefit if everybody uses the same CDN, but people don't necessarily want to trust Google or whoever to host code that their site relies on. With a content-addressable system with fallbacks, you'd get all the benefits of the CDNs with none of the drawbacks.

Re: Cdnjs - the missing cdn

#45

Earlier quoted context omitted.

How does using CDNs make you distrust a website? If someone is loading jquery.min.js from Google shouldn't you trust it more ?

When I have see that a webpage has 20 or more scripts attached to it from domains differing from the one website I am visiting, I do by default assume they are tracking scripts from advertisers or facebook or similar ilk. If a website needs scripts, I expect the website to serve it from a domain which belongs to it. For most sites I visit there are at least 30, sometimes 50 scripts from various sites and domains tryi…

This is what you're after: http://en.wikipedia.org/wiki/Gopher_(protocol)

Not an insult, by the way, Gopher is awesome. Today the Web is an applications platform and that is not going to be reversed.

Re: Cdnjs - the missing cdn

#46
post #42
post #9

Earlier quoted context omitted.

How do you know Google/Microsoft won't either?

Because their stocks would go down very quickly if they did.

You know, I'm just cynical enough to believe that security problems have little or no bearing on stock price. However, reputation is a kind of stock too, so from that perspective I agree, public CDNs like these have little to gain and lots to loose by tampering with these libraries to inject, say, a behind-page pop-up with ads.

Re: Cdnjs - the missing cdn

#47
post #30

Earlier quoted context omitted.

You are in the vast minority. A tremendously small percentage of users will actually care about a non-issue like that.

Unfortunately he is in vast minority. Only when you start using NoScript or generally paying more attention to your browser's status bar do you start to realise the scale of the ridiculousness.

If I ever ran a media site, I'd redirect noscript users to this:

"We love that you've come to value the great material we provide, but we make money off of advertizers. If you run noscript, that's great! We totally support noscript options for those who purchase a subscription plan."

Re: Cdnjs - the missing cdn

#48
I suppose if you have a big trust issue letting Cdnjs host your libraries or if you have a customized build of one, you could just do what they did and sign up for CloudFlare and control the files yourself. [edit: CloudFlare, not Cloudfront]

Re: Cdnjs - the missing cdn

#50
post #28
post #21

and here is the other 'missing' cdn that does the same thing and has been around longer: http://cachedcommons.org/ :)

cdnjs has been around for a while already.

cachedcommons claims to have been around since 2009. cdnjs claims to have been around since 2011. Im not saying one is better than the other, but i am implying that cdnjs is not 'the missing cdn'.
Post reply on HN