I'm writing a Web application that needs to store JSON data in a small, fixed-size server-side cache via AJAX (think: Opensocial quotas ).
(我正在编写一个Web应用程序,该应用程序需要通过AJAX将JSON数据存储在固定大小的小型服务器端缓存中(请考虑: Opensocial配额 )。)
I do not have control over the server.(我无法控制服务器。)
I need to reduce the size of the stored data to stay within a server-side quota, and was hoping to be able to gzip the stringified JSON in the browser before sending it up to the server.
(我需要减小存储数据的大小,以保持在服务器端配额之内,并且希望能够在将字符串化的JSON发送到服务器之前在浏览器中gzip化该字符串化的JSON。)
However, I cannot find much in the way of JavaScript implementations of Gzip.
(但是,我找不到Gzip的JavaScript实现方式。)
Any suggestions for how I can compress the data on the client side before sending it up?(关于如何在发送之前在客户端上压缩数据的任何建议?)
ask by David Citron translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…