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

I find this no-nonsense approach very appealing.

> The more you render from the server, the larger your caches end up. Not doing that for HTML.

Is HTML really that much larger or complex than JSON? Based on the following it seems to be only +10-15% larger (n = 1 dataset obviously).

https://github.com/1cg/html-json-size-comparison

Is the amount of data transfer the main reason to use JSON or do you find Web Components play better with JSON payloads? I could imagine the template string being rendered on the server, fetch()-ed by the client and swapped with this.innerHTML.

Do you manage any amount of cross-component state? It's one use case where JSON would win over "HTML over the wire".



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

Search: