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
- Re: Gzip SVG Riyaz
- Re: Gzip SVG Dave Carlson