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

The question I have [but not the answer] is:

Usually in every project there is bunch of .js [jquery, backbone, etc] and .css files. So the good practice is not only to minify and compress, but also to bundle some/all of them into several big combined files to save on extra HTTP calls.

So my question is - what is better - (1) have separate files served from such CDN [or any public CDN] or (2) combine the files and serve yourself by nginx/AWS?

Not a developer, feel free to correct any mistakes :-)




It's a great question. The answer depends on a lot of different variables like your cache hit ratio, the size & number of files, etc. I'd recommend doing a performance A/B test using JavaScript to time which one is best for your particular site. We offer a free Real User Measurement tool at Torbit (http://torbit.com) that includes the ability to do A/B tests like this.


Depends how many files you have, but for a general answer it should be 1.




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

Search: