Gzip issue with Safari

mcofko nginx-forum at forum.nginx.org
Mon May 16 10:06:21 UTC 2016

Hi all,

we have successfully enable gziping on the server side and it works
perfectly with Chrome and FF (it auto compress the files that we want).
We're using compressed assets of type: .dds and .pvr. MIME-types for those
files are: application/octet-stream. But the problem appears in Safari which
doesn't accept .gz file type extension, so we are left out with a huge
improvement regarding file size/loading time.
Those are our current settings for enabling gzip:
        gzip on;
        gzip_proxied any;
        gzip_types image/png application/javascript application/octet-stream
audio/ogg text/xml image/jpeg;
        gzip_vary on;
        gzip_comp_level 6;
        gzip_min_length 1100;
        gzip_static on;

I noticed that Apache server enables something like this: 
AddEncoding gzip .jgz
AddType text/javascript .jgz

And this little change enables that Safari acknowledge gzip type and it also
uploads it. 
So the question is what are the possibilities on Nginx? Can we somehow add
support for additional extensions?
I've also read something about gzip_static setting which look for
pre-compressed files, but it looks just for files with .gz extensions.
Do you know any solutions?

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,266915,266915#msg-266915

More information about the nginx mailing list