I noticed our API responses were 40% larger than they needed to be because every JSON response was pretty-printed with 4-space indentation. Fine for development, wasteful in production. I ran the response template through Formly's JSON minifier and confirmed the file size dropped from 85KB to 52KB. For an endpoint called 10,000 times a day, that is 330MB of saved bandwidth daily.
Pretty-printed JSON during development. Minified JSON in production. That is the pattern. Minify your JSON for production →