Ways to reduce size of data transferred over a network?

203 Views Asked by At

Is there any fast way to reduce the bytes of data during network transmission?

I send data from a server to the browser, and it's taking up quite a lot of bandwidth

My data looks like this, but with more properties:

{
  1: {width: 10.25, height: 30.75,},
  2: {width: 7.5, height: 1.25,},
}

Json encoded

1

There are 1 best solutions below

0
Chukwujiobi Canon On

Your problem has a ton of solutions. I will share some of the most common ways of network optimization.

  • Strip down the data before serialization. Consider only the properties which are of importance to the communication in question.
  • Consider other serialization options. JSON encoding is just one option for encoding data sent over the wire. Other options such as binary serialization which is much more performant than text (in this case JSON).
  • Other options you should consider include remote procedure calls which have been demonstrated to be more performant than REST.