Last Comment Bug 157514 - Gzipped SVG files (.svgz) don't work when loaded locally
: Gzipped SVG files (.svgz) don't work when loaded locally
Status: VERIFIED DUPLICATE of bug 52282
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: All All
-- enhancement with 3 votes (vote)
: ---
Assigned To: Jonathan Watt [:jwatt]
: Bradley Baetz (:bbaetz)
: Jet Villegas (:jet)
Depends on:
  Show dependency treegraph
Reported: 2002-07-15 05:50 PDT by Alan
Modified: 2007-09-19 16:10 PDT (History)
7 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description User image Alan 2002-07-15 05:50:57 PDT
Adobe illustrator 10 (only version i have to check with) exports SVGZ which is
simply an SVG file gzipped.  The Adobe SVG browser plugin displays these files.  

if you were to save an SVG file 'rectangle.svg' for example and save a copy of
it as SVGZ you would get *exactly* the same file contents in gzip archive called
rectangle.svgz, the archive would contain one file called 'rectangle' (no extension)
Comment 1 User image Alan 2002-07-15 06:21:27 PDT
link added severity changed to enhancement

Comment 2 User image Jarno Elovirta 2002-09-05 01:44:35 PDT
SVGZ will work if the HTTP response header includes:

Content-Type: image/svg+xml
Content-Encoding: x-gzip

Thus this is an issue with server configuration, not Mozilla.
Comment 3 User image P. Damian Cugley 2004-02-09 09:53:17 PST
It would be nice if .svgz files could be viewed with Mozilla, in which case
there is no server for us to configure.

Also, .svgz files are supported by more SVG viewers than Adobe's plug-in alone.
 It may be expedient to special-case this format for the sake of people who have
checked their site on MSIE + AdoveSVGViewer and are suprised when Mozilla still
cannot display it.
Comment 4 User image Jonathan Watt [:jwatt] 2004-06-27 10:35:15 PDT
FIXED/INVALID? Files with extension .svgz on a server can be viewed when the
HTTP headers are set correctly, and opening .svgz files locally also works (try
viewing, and downloading and viewing the file linked to below). Mozilla does not
and will not decide how to handle remote files depending on file name extension
for security reasons.
Comment 5 User image Jonathan Watt [:jwatt] 2004-09-15 04:45:36 PDT
Assigning to me so I remember to find out after doing mass reassign.
Comment 6 User image Jonathan Watt [:jwatt] 2004-09-20 23:36:10 PDT
Closing. One way to configure Apache to to send the correct headers for SVG
files it to add the following to a .htaccess file in a root directory. 

AddType image/svg+xml .svg
AddType image/svg+xml .svgz
AddEncoding x-gzip .svgz
Comment 7 User image Jonathan Watt [:jwatt] 2005-03-01 16:10:31 PST
Reopening. I would have sworn that Mozilla could view .svgz files loaded from
the hard drive, but apparently this has never worked. I think the times I tested
it previously, I first downloaded the .svgz files over HTTP and encountered bug
283272. Hence the .svgz files that I thought were compressed actually weren't.
Comment 8 User image Jonathan Watt [:jwatt] 2005-03-01 16:14:13 PST

*** This bug has been marked as a duplicate of 52282 ***
Comment 9 User image Jonathan Leech 2007-09-19 16:10:04 PDT
Not sure if fixing 52282 will support the following use case (So I will post this same comment in 52282 and in 157514:

A data:url containing svgz. The data url syntax doesn't have a way to specify that the content is gzip compressed, and there is only one MIME type for svg.
Mozilla throws up an XML parsing error. Opera handles it.

Why inline svgz in a data:url instead of using a compound XML document and compressing the whole thing?
1) Why not.
2) The whole XML / DTD doctype conunundrum to get the latter approach working.
3) I want to send the svg back to the server, and prefer to send compressed data.

Note You need to log in before you can comment on or make changes to this bug.