Is there any fast way to reduce the bytes of objects?
I send the objects from a server to the browser, and it’s taking up quite a lot of bandwidth
My objects look like this, but with more properties:
{
1: {width: 10.25, height: 30.75,},
2: {width: 7.5, height: 1.25,},
}
2
Answers
Your problem has a ton of solutions.
I will share some of the most common ways of network optimization.
In the end, all these options need some sort of understanding to ensure getting the best results of each.
Send your data as CSV, that way you don’t need to include field names into your payload in every item.
If you want JSON anyway you could minify your object properties and send the minification map together with the data: