Thanks for responding Serge,

Serge Knystautas wrote:

> I'm not sure exactly what you're trying to do, but yes, I've
> successfully used JServ and the java.util.zip classes.  The
> java.util.zip classes let you generate a ZIP file.  This has nothing to
> do with bandwidth constraints... you won't be able to send standard web
> pages it some magically compressed format that the browser will
> understand.  The browser will get a zip file, and ask you to save it to
> disk, or open winzip or something like that.

Actually there is a 'magically compressed format' that some browsers
understand - a browser can send the 'Accept-encoding' header to indicate
which formats of which gzip is accepted by later versions of IE and
Netscape. In tests I've seen up to reductions of up to 75% of the original
size from it.

I think the problems I'm having must be due to some mix-up with the
mime.types file for Apache - everything is being sent back as text/plain
which is why html tags are being ignored.

> Hope this helps.  Actually, I did have *another* servlet chaining idea
> called RemoveWhitespace, which would filter out all unnecessary
> whitespace in a web page.  This was great because as we were developing,
> we could see very nicely formatted HTML, but then when we went to
> deliver this in production, we'd apply this filter and save 10-15% space
> per page.  Normally that's not a big deal, but this was on a "web-CD"
> where the more space we could save meant more space for
> products/advertisers, so there was real financial incentives.


That's a useful idea actually - amother potential use for this is when using
template systems which can often add a fair amount of whitespace extending
the page unnecessarily.

Thanks,

Simon



----------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to