Forum Discussion
HTTP Compression and the Vary Header
We have an Virtual Server which has the oracle_as_http-wan-optimized-compression http profile assigned to it. The default compression values are set to a minimum of 1024 bytes. It also has the 'Vary' header insert ticked.
The problem is this. If any objects under 1024 bytes pass through, they are not compressed, but the Vary header is added anyway, which seems kind of pointless to me, as a proxy server would never receive this object compressed, and therefore why would it need to have a variance for accept-encoding on the hash and keep two copies possibly.
The bigger issue, is that due to the way IE6-8 works, if they receive a uncompressed object that has a Vary header included, it will not cache it. This is causing performance problems for our high latency users, and i need to fix it.
I could lower the compression minimum threshold, which could end up increasing the latency of certain low size objects. I could remove the Vary header altogether would could provide an issue with any proxied connections. Or, could I disable the HTTP profile Vary header insert and write an iRule which checks the object size and then either adds it or doesnt?
I am raising a Support Case on the issue itself as i dont believe the LTM should be adding this header when the content is clearly not going to be compressed, but any help with the iRule or alternative options would be appreciated.
- hooleylistCirrostratusHi Steve,
when HTTP_RESPONSE { if {[HTTP::header Content-Length] > 0 and [HTTP::header Content-Length] < 1024}{ HTTP::header remove Vary } }
- Steve_Luke_8796NimbostratusThanks hoolio, but isnt it the case that you cant remove something via an iRule that a HTTP profile inserts?
- adharkraderNimbostratusWe're having a similar issue. By default, things like images aren't compressed but the Vary header is added anyway... so IE doesn't cache them locally.
- hooleylistCirrostratusThanks hoolio, but isnt it the case that you cant remove something via an iRule that a HTTP profile inserts?
- spark_86682Historic F5 AccountWhat hoolio says is true, but in this case it isn't HTTP code inserting the Vary header, it's the compression code. So I don't think you'll be able to remove it in HTTP_RESPONSE. You could remove it in HTTP_RESPONSE_RELEASE if your version supports that event, but if your compression settings are still in your http profiles, then you're likely still on a 10.x or earlier release, which doesn't. What version are you on?
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com