Forum Discussion
Compression when request has a query string?
I am configuring F5 LTM 11.5 with compression and cache to optimise delivery as we look to go live.
With compression, enabled with default values initially, there is no problem if the request is a straight XYZ.js.
The instant we add a version query string to it, so XYZ.js?version=A.B.C, it doesn't compress. Can anyone please shed some light on where i've gone wrong and what I need to do in order to get this working? It's fine with either the Netscaler we have now, or the A10 we just trialled.
Many thanks!
9 Replies
- What_Lies_Bene1
Cirrostratus
Are you compressing by URL or Content Type?
- Tom_63996
Nimbostratus
I've removed the content section, so just URI, which is default at .*
- What_Lies_Bene1
Cirrostratus
Can you post the profile CLI configuration output please? I always use Content Type which keeps things fairly simple.
- Tom_63996
Nimbostratus
I've changed it round to be content-type, as that makes more sense I think.
The config is this:
ltm profile http-compression V2QA_DefaultCompression {
app-service none buffer-size 1048576 content-type-exclude none content-type-include { text/* application/javascript application/x-javascript application/* } defaults-from wan-optimized-compression gzip-level 6 uri-exclude none uri-include none}
I see it compressing CSS, which we also feed a query string, but still not the JS files.
Many thanks for your help!
- What_Lies_Bene1
Cirrostratus
Hmmm. Looks OK.
Can you do a quick tpcdump (or use HTTPHeaders or something similar at the browser end) to see if the responses that are not compressed have a Content-Type header?
If they don't you may need to switch back to URI and add * to the end of the URI types (.js rather than *.js).
- Tom_63996
Nimbostratus
Headers look OK to me - this is from Fiddler, response headers:
HTTP/1.1 200 OK Content-Type: application/javascript Last-Modified: Fri, 04 Jul 2014 12:42:24 GMT Accept-Ranges: bytes ETag: "dfdb99678597cf1:0" Date: Thu, 10 Jul 2014 15:38:41 GMT Transfer-Encoding: chunked
- What_Lies_Bene1
Cirrostratus
Accept encoding headers also there in the request?
Also, do you have Chunking: Selective in the HTTP profile.
Sorry, things keep coming to mind as we go.
- Tom_63996
Nimbostratus
it wasn't, but it is now with no change on compression.
request header is :
Accept-Encoding: gzip,deflate,sdch
- What_Lies_Bene1
Cirrostratus
Odd. Is it because the .js files are tiny perhaps?
Again, have you tried switching back to URI and using .jpg?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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