Disable gzip for certain files (globally)?

Discussion in 'Apache Migration/Compatibility' started by ffeingol, Jun 16, 2009.

  1. ffeingol

    ffeingol Member

    Is there any way to disable gzip for certain file names (globally)? The latest version of WordPress (2.8) creates stylesheets like this:

    Code:
    link href='style' href='http://blah.com/wp-admin/load-styles.php?c=1&dir=ltr&load=dashboard,plugin-install,global,wp-admin&ver=abcdefghi'
    
    The output is getting gzipped so the dashboard does not load right.

    I found this code:

    Code:
    RewriteRule . - [E=no-gzip:1]
    
    In another post, but we can't have every client adding this for every wordpress install.

    We're also still running 3.x on this particular server.

    TIA
  2. mistwang

    mistwang LiteSpeed Staff

  3. ffeingol

    ffeingol Member

    Worked perfect. Thank you.
  4. brrr

    brrr New Member

    Out of curiosity, how did you end up specifying the compressible type in this instance?

    It doesn't look like the Wordpress thing ends in CSS, so I would have thought a rule like !text/css as per mistwangs reference wouldn't have worked.
  5. mistwang

    mistwang LiteSpeed Staff

    just check the Content-Type return in the response header with firebug.
  6. ch1v4s

    ch1v4s New Member

    Hi, i'm just using litespeed and upgrade to wp2.8.1, and i have the same problems, i added !text/css, !text/js, !text/javascript to compressible type but my dashboard still not load right. No formating panel and i cant switch from HTML/Visual.
  7. mistwang

    mistwang LiteSpeed Staff

    Maybe those has been cached, try cleaning up the cache.
    Install FireBug and check the response header for those requests.
  8. ffeingol

    ffeingol Member

    We actually tracked the issue down to the way that Fantastico installs the db. There is an optino that gets set 'wrong'. Here is the fix:

    - You'll need to go into the wp_options table
    - search for a row where the option_name = 'can_compress_scripts'

    The option_value for that row will be a 1 (one). You can either delete the row or just update it and set to to 0 (zero).

    That should fix you up if it's a Fantastico install. We worked with Netenberg and now they don't even insert this row. The first time you log as admin it will properly set the value.
  9. ffeingol

    ffeingol Member

    @mistwang,

    At least with Fantastcio it was a double compression issue. Because they were 'setting' the value rather than letting WP check it. Basically WP was doing the content compression and then LSWS was doing it a second time.
  10. mistwang

    mistwang LiteSpeed Staff

    4.0.5 should have addressed that.
    I might be wrong, from the bug report I got, it relates to "Content-Encoding: UTF-8" header set by PHP. LSWS wont double compress response body.
  11. ch1v4s

    ch1v4s New Member

    Checked, the value option is 0 (zero), cleared cache but no luck. :(
  12. mistwang

    mistwang LiteSpeed Staff

    If the file is compressed by PHP, you should disable compression on PHP side and let LSWS handle it.
  13. ffeingol

    ffeingol Member

    The problem (for us at least) was that Fantastico was not letting WordPress actually run it's test, they were just building the database with the values from their server. I hope that makes sense.
  14. mistwang

    mistwang LiteSpeed Staff

    Please test it with our latest 4.0.5 release see if it still break.
    If it does, we can work together to have it addressed.
  15. ch1v4s

    ch1v4s New Member

    Solved it. It's not wordpress or litespeed, but it's my theme.

    Thanks for all helps.
  16. IrPr

    IrPr New Member

    There is something wrong with LSWS 4.0.7 and Wordpress

    Today i upgraded all my servers to latest 4.0.7 version and suddenly all WP hosts admin ajax features had been broken

    I found that on LSWS 4.0.7, load-scripts.php which loads all ajax needed JS scripts is not loaded completely, so no any ajax features are available
    while when i switch back to 4.0.6 the load-script.php will response completely

    When i tried to disable gzip using RewriteRule, it will fix
    but i have to do that for every WP host manually

    So i forced to switch back all my servers to 4.0.7

    Whats wrong with 4.0.7 exactly?
  17. mistwang

    mistwang LiteSpeed Staff

    This bug has been fixed, please download and try 4.0.8.

Share This Page