▲ | wild_egg 3 days ago | ||||||||||||||||||||||||||||||||||||||||
> I don't have stats to back that up. Your comment then falls under my "superstition" label. My experience has been that the HTML version will send overall less data since it contains precisely what is required by the UI and nothing more. The JSON APIs try to be "generic" across clients and either send more than the client needs or send less and cause the client to wait on a waterfall of requests to load everything. You should always run benchmarks for your use case but the majority of web projects are not Figma or AutoCAD and benefit drastically from simpler approaches. A single compressed HTML response will beat a cascade of JSON ones every time. | |||||||||||||||||||||||||||||||||||||||||
▲ | 8n4vidtmkvmk 3 days ago | parent [-] | ||||||||||||||||||||||||||||||||||||||||
For first load, yes. The idea is that you never have to send the template again after that. Cascading is a separate problem. You can bundle all the data into a single request if you want. You can even send JSON along with the HTML in the first request. | |||||||||||||||||||||||||||||||||||||||||
|