views:

38

answers:

2

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

Our app server is Java/JBoss.

+2  A: 

Looks like this might be the answer: (turning on gzip in JBOSS) http://stackoverflow.com/questions/2826059/cannot-turn-on-gzip-compression-in-jboss-5/2826698#2826698

scunliffe
Thanks - suppose we'd just need to figure out how to uncompress on client for jqGrid
Marcus
@Marcus: the browser will handle that automatically.
Matt Ball
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
@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
A: 

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.

Oleg