2 ms·
I give you everything, except efficiency. As an example, I did a view source of the blog entry linked in this submission. The instance of the page that I got wa
by xg15 11y ago
I give you everything, except efficiency. As an example, I did a view source of the blog entry linked in this submission. The instance of the page that I got was 22914 characters long, of which 2172 characters were actual article text - roughly 10%. If I as a user wanted to view more entries from that blog, I think I'd be very grateful if I only needed to download the remaining 90% once and not again for each blog entry.
- justin_vanw 11y agoThere are 2 things wrong with your analysis, IMO. First of all gzip will reduce this considerably. Both will end up much smaller, but also the % difference will be reduced, since the html version is likely to contain much less entropy per bit. Secondly, in my version of how to do it, you can still use AJAX. It's fine to load blog posts via AJAX, and in that case you aren't reloading the boilerplate of the page? I am saying to return rendered html in the response rather than returning json and rendering it into html in the browser. The specific data returned can be the same either way, and the overhead of html over json in the case of a set of blog posts should be tiny, and depending on how much markup the posts themselves contain, the html version is quite possibly going to be smaller.