0

Is there a way to compress/uncompress JSON sent from an app server to a jqGrid client?

Our app server is Java/JBoss.

Marcus Leon
  • 55,199
  • 118
  • 297
  • 429

2 Answers2

2

Looks like this might be the answer: (turning on gzip in JBOSS) Cannot turn on gzip compression in JBoss 5

Community
  • 1
  • 1
scunliffe
  • 62,582
  • 25
  • 126
  • 161
  • Thanks - suppose we'd just need to figure out how to uncompress on client for jqGrid – Marcus Leon Sep 28 '10 at 13:19
  • 2
    @Marcus: the browser will handle that automatically. – Matt Ball Sep 28 '10 at 13:20
  • I see.. how does it know to uncompress the data? Is there a header that indicates the data is zipped and the browser will uncompress? – Marcus Leon Sep 28 '10 at 13:27
  • @Marcus - yes, the browser sends the request into the server indicating that it can handle gzip compressed content... when the server sees this, (and you tell it to) it sends back compressed content (and includes a header that says such). If you have Firebug installed, go to the `Net` tab and hit a few pages on StackOverflow, you'll see the headers in the request/response for each page. – scunliffe Sep 28 '10 at 14:04
0

Look at this old answer where I described some ways how one can reduce the size of the transfered data using different options of the jqGrid.

If you post an example of you current JSON data sent and the current definition of colModel I could give you some more situation oriented advices.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798