4 ms·
Isn't making extra HTTP requests just to get the username even more wasteful?
by icebraining 12y ago
Isn't making extra HTTP requests just to get the username even more wasteful?
- nkuttler 12y agoYou can get several things in one request if you want to. But yeah, it's a tradeoff. The main advantage seems to be cacheability, though that can get less important if you cache e.g. template fragments instead of entire pages.
- grandalf 12y agoTemplate caching is still server side which means you are using an application process to do the same exact trivial thing over and over which could have been offloaded to a cache or to the client.
- nkuttler 12y agoYou always need to do the server-side work, no matter where the data is rendered or cached later. Like I said, it's a tradeoff.
- remon 12y agoYes, yes it is. For a number of reasons but the most overlooked one is that server CPU cycles and client CPU are not equally expensive.
- grandalf 12y agoNo, not with pipelining or SPDY or HTTP2. Also No, not with any kind of intermediate caching (assuming not all resources have identical cache lifetimes)