Problem with SVG compression

Discussion in 'General' started by geraldjim, Apr 22, 2014.

  1. geraldjim

    geraldjim Member

    Hi everyone,

    I have gzip compression working for just about all elements on my site but for some reason SVG files are not getting compressed.

    The htaccess file contains the following:

    <IfModule mod_deflate.c>
    SetOutputFilter DEFLATE
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/x-httpd-php
    AddOutputFilterByType DEFLATE application/x-httpd-fastphp
    AddOutputFilterByType DEFLATE image/svg+xml
    AddOutputFilterByType DEFLATE application/x-font-ttf
    AddOutputFilterByType DEFLATE application/
    AddOutputFilterByType DEFLATE font/opentype font/ttf font/eot font/otf

    The headers of the file match and everything else is getting compressed. Any suggestions?

  2. mistwang

    mistwang LiteSpeed Staff

  3. geraldjim

    geraldjim Member

    Thanks for the reply and will test this today.

    However, the question remains why I am not able to compress these files via the .htaccess file? The reason I am forcing this question is that like many of us that are using hosting services we only have access to the htaccess file and not the server configuration. Therefore it is important for us to be able to compress these files via the htaccess.

    Will let you know if the alternative works.
  4. mistwang

    mistwang LiteSpeed Staff

    the Apache AddOutputFilterByType directive is not supported by LiteSpeed yet. what should be compressed is configured with LSWS native configuration at server level, usually do not need to be changed.
  5. geraldjim

    geraldjim Member

    Thanks for the clarification - much appreciated.

    I take your point and my question is the above option the only way to force XML documents to be compressed or is there another alternative. Currently I am exploring all options as I feared my ISP currently needs to review this change as the impact on them is significant as you can appreciate.

    If not, may I suggest that for future release that SVG documents by default be compressed.

    Thanks for your help.
  6. mistwang

    mistwang LiteSpeed Staff

    Yeah, we will add that MIME to the default Compressible Type configuration.
  7. geraldjim

    geraldjim Member

    BTW - my ISP is now waiting for the next release to implement the fix. Will the next version contain this change and when do we expect the next release?

Share This Page