Chirag
Chirag

Reputation: 1929

How do you enable gzip compression for favicon.ico?

How do you enable Apache to compress favicon?

FAILED - (11.6 KB, compressed = 5.7 KB - savings of 5.9 KB) - http://website/favicon.ico

Upvotes: 12

Views: 8460

Answers (3)

Henk
Henk

Reputation: 329

Judging from your example, the fail is from the WebPagetest.
Add the line below to the file /etc/apache2/mods-enabled/deflate.conf (for Apache 2.2 on Ubuntu 12.04):

AddOutputFilterByType DEFLATE image/x-icon

Reload apache afterwards.

Upvotes: 13

jlecour
jlecour

Reputation: 3045

Here is my configuration for assets compression with Nginx :

gzip on;
gzip_min_length  1100;
gzip_buffers  4 32k;
gzip_types  text/plain
            application/x-javascript
            text/xml
            text/css
            font/woff
            application/font-woff
            font/truetype
            font/opentype
            font/eot
            application/vnd.ms-fontobject
            image/svg+xml
            image/x-icon;
gzip_vary on;

Upvotes: 9

Manuel Garcia
Manuel Garcia

Reputation: 54

You could use imagemagick to compress the ico file:

compress -color 16 PATHTOORIGINAL/file.ico PATHTONEW/file.ico

Upvotes: -1

Related Questions