Cannot enable gzip compression

Discussion in 'General' started by bennieblanco, May 4, 2017.

Tags:
  1. bennieblanco

    bennieblanco Member

    Last edited by a moderator: Feb 8, 2018
  2. bennieblanco

    bennieblanco Member

    it is still wildcard issue ,
    I added
    Code:
    text/*, application/x-javascript, application/xml, application/javascript, text/css, text/javascript, text/js
    and it started working , but still singeling out some files like style.css?ver=1.0.0

    not seeing it as CSS
     
    Last edited by a moderator: Feb 8, 2018
  3. NiteWave

    NiteWave Administrator

    can you give a link which gzip not working ? see if its size is below 300 bytes or anything else.
     
  4. bennieblanco

    bennieblanco Member

    Thnx for the reply!

    yes the size is below 300B, one file js file has only this
    Code:
    {"fragments":{"div.widget_shopping_cart_content":"<div class=\"widget_shopping_cart_content\">\r\n<ul class=\"cart_list product_list_widget \">\r\n\r\n\t\r\n\t\t<li class=\"empty\">No products in the cart.<\/li>\r\n\r\n\t\r\n<\/ul><!-- end product list -->\r\n\r\n\r\n<\/div>"},"cart_hash":""}


    and one css file is 186B
     
  5. bennieblanco

    bennieblanco Member

    but none of them work if I dont add
    Code:
     text/css, text/javascript, text/js
    to mimes
     
    Last edited by a moderator: Feb 8, 2018
  6. bennieblanco

    bennieblanco Member

    duhh! it says right there
    Code:
    http://prntscr.com/f4cppt
    300B min

    ok il change that and test but what about the wild card issue?
     
    Last edited by a moderator: Feb 8, 2018
  7. NiteWave

    NiteWave Administrator

    can you be more specific about "wild card issue" ?
     
  8. bennieblanco

    bennieblanco Member

    the original mime types are this
    Code:
    text/*, application/x-javascript, application/xml, application/javascript

    meaning text/* ( any ) ,

    if I leave the default css and js files are not gziped ,

    so I had to add my own in order to get the css/js gziped

    text/*, application/x-javascript, application/xml, application/javascript, text/html, text/css, text/plain, text/xml, text/x-js, text/js, text/javascript
     
    Last edited by a moderator: Feb 8, 2018
  9. NiteWave

    NiteWave Administrator

    now I got clear about the issue.
    I did a test on a 1.6kb litespeed.min-170317.css file ( can get it from https://www.litespeedtech.com/templates/litespeed/css/litespeed.min-170317.css)
    Compressible Types is the default:
    Code:
    text/*,application/x-javascript,application/javascript,application/xml, image/svg+xml
    (without text/css)
    when I access it in Chrome, it shows:
    Code:
    Content-Encoding:gzip
    Content-Length:9579
    this is correct as expected.
    so unfortunately I can't simply reproduce the issue you encountered.
     
    Last edited by a moderator: Feb 8, 2018
  10. NiteWave

    NiteWave Administrator

  11. bennieblanco

    bennieblanco Member

    So we need to list them now? Looks like the description for text/* should be changed in admin since we all expect the wildcard to work.
     
  12. Unique_Eric

    Unique_Eric Active Member

    Generally, if e.g. text/js can not find in
    Code:
    $SERVER_ROOT/conf/mime.properties
    then text/* not include it, you still need to add by yourself.
     
    Last edited by a moderator: Feb 8, 2018
  13. joviermark

    joviermark New Member

    In terms of availability, 7zip is widely available across UNIX (Linux/BSD/MacOS) and Windows systems. Therefore a zip file is highly portable. xz and 7zip are known to have a better compression algorithm than gzip, but use more memory and time to compress/decompress. when backing up I would recommend tar.7z as it has the highest compression rate saving you space but uses an extra program (7zip). .tar.gz will be larger files and do the same job, you could also use bzip (.tar.bz/bz2) although i'm not sure if that would suit you better as I use gzip or 7zip
     

Share This Page