Live data from Hacker News

JQuery SSL Certificates Expire

code.jquery.com

21–30 of 44 posts

Re: JQuery SSL Certificates Expire

#21
post #5

Earlier quoted context omitted.

Wouldn't this be solved by hosting it on your own site?

I assume that will work,but it will introduce two problems. 1. Keep a local copy means you will be the one paying for the bandwidth to serve it. 2. You will have to manually update your local copy everytime upstream makes improvements. Having things locally increases reliability but it carries its own costs.

No these are not the reasons:

1. This cost is minimal, and most of the time will be served from cache anyway. I'd be willing to stake a claim that literally zero people ever have worried about the cost of serving jQuery when they weren't already worried about the cost of serving a bunch of other shit that eliminating just jQuery wouldn't fix.

2. This is completely undesirable, and doesn't happen anyway because you like to a specific version which does not change from under you.

The arguments in favor of hosting it on a CDN like googles are:

1) Clients who visit other sites will precache the file, so there is a chance they wont even need to load jQuery at all, and this can increase perf

2) Pushing some files to different domains can decrease load times because browsers can load files from multiple domains in parallel instead of serially like they would from one domain.

3) For smaller sites the google CDN is likely actually more dependable than your own. But if you've invested in a CDN this is no longer true.

Re: JQuery SSL Certificates Expire

#22
post #5

Earlier quoted context omitted.

Wouldn't this be solved by hosting it on your own site?

I assume that will work,but it will introduce two problems. 1. Keep a local copy means you will be the one paying for the bandwidth to serve it. 2. You will have to manually update your local copy everytime upstream makes improvements. Having things locally increases reliability but it carries its own costs.

#2 isn't solved with a CDN since you'd always hotlink a specific version - the version you tested your code with.

The main reason I think isn't even really #1 (cost) but a general assumption that CDNs are faster than your servers, and the chance that if multiple sites are sharing one of these CDNs, you actually have first-time users who can visit your site a bit faster because they already have that resource cached.

Re: JQuery SSL Certificates Expire

#25
Are there any proposals for a local CDN-like caching system capable of handling these sorts of "universal resources"?

I understand the difficulties would be many (trusted sources, versioning, etc.) but I bet it would have a huge impact on the overall web's bandwidth consumption if a page could say "load standard jQuery v1.10.2 on this page, if not cached find it here or here".

Re: JQuery SSL Certificates Expire

#26
post #22

Earlier quoted context omitted.

I assume that will work,but it will introduce two problems. 1. Keep a local copy means you will be the one paying for the bandwidth to serve it. 2. You will have to manually update your local copy everytime upstream makes improvements. Having things locally increases reliability but it carries its own costs.

#2 isn't solved with a CDN since you'd always hotlink a specific version - the version you tested your code with. The main reason I think isn't even really #1 (cost) but a general assumption that CDNs are faster than your servers, and the chance that if multiple sites are sharing one of these CDNs, you actually have first-time users who can visit your site a bit faster because they already have that resource cached.

Some CDNs like Google's will let you specify just the major version, so in the case of jQuery it would serve 1. or 2..

Generally undesirable in a production environment, though.

Re: JQuery SSL Certificates Expire

#27
post #5

Earlier quoted context omitted.

Wouldn't this be solved by hosting it on your own site?

I assume that will work,but it will introduce two problems. 1. Keep a local copy means you will be the one paying for the bandwidth to serve it. 2. You will have to manually update your local copy everytime upstream makes improvements. Having things locally increases reliability but it carries its own costs.

Paying for jQ bandwidth is like paying for air, seriously.

With jQ, you're most likely defining the version you need, so getting upstream improvements with jQ is a bit more involved than the library simply updating itself if you aren't using the edge version.

A better argument for using a CDN is that jQ library is likely going to be cached if the user's been on the web for more than 5 minutes. Chances are, your version will be one that's cached and, instead of waiting for the downloading of a library that already exists on the users system, the library is immediately loaded and perceived PLT is decreased as a result.

There are also numerous CDNs out there, I would use a fallback stack to ping the next CDN in line as it would be a cold day if every major CDN that hosts jQ were to lose SSL support for a time.

Post reply on HN