Forum Discussion

Ankit_Sanghani_'s avatar
Ankit_Sanghani_
Icon for Nimbostratus rankNimbostratus
May 16, 2016

JavaScript is not been compressed by HTTP compression profile

i've enabled HTTP compression profile for my one of the web application with Content list box check marked.I've include keyword "text/javascript" and "application/javascript" in content list box.after updating the HTTP profile to Virtual server and seems that Javascript content in HTTP header is not getting compressed by http profile.

 

Content Type Compression (bytes)Pre-CompressPost-Compress HTML 8.3T 1.9T CSS 3.6M 922.7K JavaScript 0 0 XML 291 233 Any thoughts?

 

  • Hi, could you share your profile and VS configuration here? Is the javascript content with minimal content length for compression as in the profile setting? What is the Big-IP running version? Respectfully
  • BinaryCanary_19's avatar
    BinaryCanary_19
    Historic F5 Account

    make sure that the URL of the javascript is not matching both the Includes and Excludes section. The patterns are Regex. You might want to look into Start-of-Line modifiers in order to tighten the URL matches.

     

    1. Make sure you have compression license enabled on the F5.
    2. There has to be HTTP Compression profile on the right Virtual Server.

    Assuming you have 1 & 2, the next to check is to make sure that the client is sending "Accept-Encoding" header with gzip or deflate - F5 supports these 2 compression methods in 10.x & 11.x

     

    The next thing to check is to make sure you have meet the "minimum content length" and you are using the right HTTP version to check the compression. Also, look through the compression profile setting one at a time and make sure your request matches them just to be sure.

     

    You can also force compress the request by using iRule

     

  • JG's avatar
    JG
    Icon for Cumulonimbus rankCumulonimbus

    There might be a bug somewhere. The following worked for me on v11.6.1 HF2:

    application/(xml|x-javascript|javascript)

    .