Forum Discussion
tidenz_92110
Nimbostratus
Sep 08, 2009Compression based on user agent
Hi Guys
I am looking to mimic some functionality we have currently with our apache servers on the bigip where based on the user agent certain content is compressed. Rather than reinventing the wheel has anyone done something similar?
My initial thinking is to if/elseif based on user agent and a Data set to specifiy which content can be compressed.
Is my idea workable?
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|pdf|swf)$ no-gzip dont-vary
Header append Vary User-Agent env=!dont-vary
- The_Bhattman
Nimbostratus
If you search user-agents on this site you will find plenty of examples of using IF/ELSEIF or switch statements with user-agents.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects