4

SVGZ format only works when I test it on local on Google Chrome. (doesn't work on other browers) It worked fine with svg though. Otherwise, on server, it doesn't work. I tried to add a .htaccess file with the lines

AddType image/svg+xml svg
AddType image/svg+xml svgz
AddEncoding x-gzip .svgz

But it still doesn't work. Tried it inline and background, same result.

Here's the link to my test

I tried it in multiple background (with texture), and on the bottom of the page in inline.

I'm stuck.

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
Naemy
  • 446
  • 2
  • 5
  • 17

1 Answers1

3

httpd.conf & mime.types

httpd.conf is located at apache/conf/httpd.conf. Ensure that these two lines are there:

AddType image/svg+xml svg svgz
AddEncoding gzip svgz

Alternatively you can only add the AddEncoding line and take care of the mime type via mime.types in the same directory. Ensure that the following line is there:

image/svg+xml svg svgz

Restart Apache then clear the browser's cache, reload, and check the headers.

arauzo
  • 185
  • 1
  • 7