开发者

Is there a way to send compressed post data using jquery?

I am quite sure this question might sound silly but I am just curious to know if it is possible to compress data before sending it through jQuery post. I was looking for jQuery plugins that have compression algorithm but couldn't really find anything relevant. I am aware开发者_C百科 that Javascript should no really be used for compression because it is slow but what does one do if the outgoing post involves large amount of data? Any suggestions?


Try this: http://rosettacode.org/wiki/LZW_compression#JavaScript


Maybe this one? http://jszip.stuartk.co.uk/


lz-string

I've used this in production and had no issues. First compress client-side, then decompress on server. Especially useful if your server is Node, so you can use the exact same code to ensure compatibility.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜