Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

i still don't understand why in 2014 it's not possible to have an entire website with all it's files zipped and shipped as it is on the first request. how wasteful is it to have 50 requests for a server just for images and resources? have your root domain be a zip file of everything you need to view it, and then include some additional popular pages along with it. it can't get any faster than that


Well, why not? You can inline everything (including images with data:// URIs) and zip it up. Apache can serve the static zip file to browsers that support it http://stackoverflow.com/questions/75482/how-can-i-pre-compr...


> how wasteful is it to have 50 requests for a server just for images and resources?

On the other hand, how wasteful is it to download tons of content that would be useless because the user might've navigated away from your site already?


Cached resources can actually make it faster then the packaged model you described.

For example I go to site A which uses jquery from the google cdn then I switch to site B which uses the same cdn. The browser doesn't even make a request for the jquery resource then, it just loads the cache. If the full site was loaded as a zip file we'd be downloading redundant jquery data twice.


It's coming. That's what HTTP/2 PUSH is for.




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

Search: