I want to send a compressed POST data with Javascript to a server I control. Is there any way to let the HTTP layer deal with the compression.
I\'m sending JSON. If
Just achieved this using https://github.com/dankogai/js-deflate However the postdata for whatever reason will strip the + signs and replace them with spaces.
To send the data via javascript:
params.mapdata= btoa(RawDeflate.deflate(JSON.stringify(mapdata)));
To receive the data via php:
$value = gzinflate(base64_decode(preg_replace('/\s/', '+',$value)));