AngularJS compresses $ http post data

I am creating an Ionic application that should send large amounts of data to a server written in php. I am looking for a way to compress the data that I submit to speed up my application. I'm not sure of the best approach, I tried LZString , but the compressToEncodedURIComponent return value is too big for my needs, then I tried using pako , but I was still not happy with the compression ratio. What is the best way to compress the data that I send to the server? Should I compress it separately (from one of the libraries I mentioned), or is there a way to allow the Angular $ http service to handle compression?

+5
javascript angularjs compression
source share
1 answer

Angular does not have compression utilities.

If you really need to compress, you'll have to find a JavaScript library for this, which I don't know anything about, but this question and this question are good places to start.

Considering that compression can take some time (and does not always give big results), perhaps another alternative is to make the data as possible as possible using their own code, and then just have a good β€œwaiting” UX-keep user reporting progress and allows them to do things while it loads in the background. Most mobile users expect large amounts of data transfer at any time.

+1
source

All Articles