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

Are you serious?

1. The browser requests CDN resources directly and Javascript is used to combine those static files into something that the user sees. Since the code is executing on the client, the app server is not overloaded.

2. Suppose you have a list of 20 items. You could either output HTML with all the tags already rendered for each of the 20 items, or you could output a JSON array with 20 objects, which is much less on the wire.

3. If you are rendering stuff on the client and only fetching data for it (which is what modern Javascript MVC frameworks let you do) then you can cache that data and re-use it. Caching entire HTML pages is at a much lower level of granularity that caching each piece of data you get from the server, and reassembling it in different ways.



1. Use a CDN that supports ESI, like CloudFront.

2. It's not that much of a difference, after gzipping, which you surely already do.

3. See number 1.

Moreover, in the end, you'll get a less heavy document to be processed by the browser. I swear my all bells and whistles i7 X1 Carbon still struggles on some javascript-heavy sites.


Please do elaborate on 1 :)





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

Search: