Any benefit to GZIP the UIDL?

I just ran Chrome’s AUDIT feature in their developer tools, and I confess I don’t really understand it, but it does have this one suggestion that could be useful (or not!):

Enable gzip compression
Compressing the following resources with gzip could reduce their transfer size by about two thirds ( ~17.10KB ) :
/open-eSignFormsVaadin/vaadin/UIDL?windowName=main could save ~3.71KB
/open-eSignFormsVaadin/vaadin/UIDL?windowName=main could save ~130B
/open-eSignFormsVaadin/vaadin/UIDL?windowName=main could save ~3.48KB
/open-eSignFormsVaadin/vaadin/UIDL?windowName=main could save ~2.64KB
/open-eSignFormsVaadin/vaadin/UIDL?windowName=main could save ~130B
/open-eSignFormsVaadin/vaadin/UIDL?windowName=main could save ~3.64KB
/open-eSignFormsVaadin/vaadin/UIDL?windowName=main could save ~3.37KB

I presume it would be similar for most other apps.

It also suggested caching those URLs, so it’s clearly not the most accurate audit report as caching the UIDL would be bad.

There is a component which does compress the requests

But look in the forum for more indeepth discussion of pro/contra using the component.

In short terms:

  • Usually you let apache or similar handle the compression
  • If that’s not possible, then you could use the component


What sort of changes to Tomcat would be necessary to have it gzip the UIDL?

As soon as the application is used over the Internet or a WAN, gzip is a win. I typically do it in Apache instead (used to be more efficient CPU-wise, not likely to be as much of an issue nowadays)

It seems that the example above doesn’t really address the mime types involved. I am currently testing with this added to the Tomcat Connector:

compression=“on” compressableMimeType=“text/html,text/xml,text/plain,application/xml,application/json,application/javascript,application/pdf”

It seems that application/json is required for UIDL compression. Unfortunately, it’s hard to determine exactly how much benefit this is giving me versus the cost of compression, etc.

Cost of compression: negligible. Impact on transmission speed: quite perceptible on a WAN over slower links. Especially private WANs.