Very large HTTP request vs many small requests

后端 未结 3 1507
广开言路
广开言路 2020-11-29 20:44

I need a 2D array (as Json) to be sent from server to client. It would be around 400x400 in size with each entry around 4 characters of text. So that makes it around 640KB o

3条回答
  •  無奈伤痛
    2020-11-29 20:51

    Unless you are dealing with slow (very slow by today's standards) connections and really need incremental updates, do it in one request.

    That gives you better efficiency for compressing the response, and avoids the overhead of the extra HTTP requests and response headers.

提交回复
热议问题