I don't know the correct mime type off the top of
my head, but you need to set the respone content type to "svgz" (or something
similar) not "gzip".
----- Original Message -----
Sent: Thursday, December 12, 2002 11:36
AM
Subject: Gzip SVG
Hi, I am generating a svg file using java
servlet at runtime and sending it to the client. However, I'd like to gzip it
before I send it to the client. For that I am doing this:
1) set header: response.setHeader("Content-Encoding",
"gzip"); 2) write output using Gzip
class GZIPOutputStream gzos = new
GZIPOutputStream(response.getOutputStream()); gzos.write(svgString.getBytes());
gzos.close();
After adding this
code, when I run the servlet from the browser, instead of displaying the svg
file on the browser it pops up a window and asks for downloading the
file...
How can I get the gzipped
svg file to be displayed on the browser..
Thanks for any help..
Riyaz
|