How to send compressed (deflated) SVG via Apache2?

前端 未结 5 529
夕颜
夕颜 2020-12-04 21:49

I have specified the following attributes in my site\'s .htaccess file:

AddOutputFilterByType DEFLATE image/svg+xml
DeflateCompressionLevel 9
He         


        
5条回答
  •  时光取名叫无心
    2020-12-04 22:24

    I suspect this is due to the plus sign in the MIME type, which may need escaping in the AddOutputFilterByType directive. You can also try using the AddOutputFilter directive instead, to process all files with a certain extension:

    AddOutputFilter DEFLATE svg
    

提交回复
热议问题