Hacker News new | past | comments | ask | show | jobs | submit login

I disagree with your assessment (and so does the majority of people on that pull request, it seems).

It's always better to use a CDN because:

1. It has a chance to be already cached (specially if you use Google's CDN).

2. All browsers nowadays do 6 parallel requests per host. So using DNS prefetching with `rel=dns-prefetch` will be faster.

3. If you bundle jQuery with your site's JS files, every time you change a single JS file of your own, your users will be forced to re-download your bundled jQuery. Seems pretty inefficient to me.




If you're using HTTPS then "it's always better to use a CDN" is unlikely to be true due to the costs of negotiating the secure connection.

1. Is open to debate and we have no real numbers of this - hopefully the resource timing API will all us to shed some light on the issue

2. Not sure how the number of connections is relevant as the connection to the CDN will be a new one.

3. Agree with this, people need to merge files that naturally fit together an have similar patterns of change


It wasn't MY assessment, I just posted the assessment of other s to start the conversation. I don't think you should never use a CDN, there are quite valid reasons to do so. But people shouldn't go around saying that is the only way to go either. It should depend on your site, and the testing you do on that site.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: