JediWizard has asked for the wisdom of the Perl Monks concerning the following question:
Wise Monks, I have a question about perl and CGI applications.
I have a CGI application which dynamically generates very large pages (up to arround 20 mb of html). Naturally this can take some time, not only to generate, but also to transmit across the web, and display on the client side. I am currently investigating ways to reduce the size of the HTML, but that is not what I want to ask here. I know there is a mod for apache which will gzip the output from a script, in a way which the browser will recognise and unzip automagically. I, however, have had no success in getting this plug-in to function properly. My question is: Is there a way to do this entirely on the perl side? I would like to build a string in perl, gzip it, and send it to the browser and have it automagically unzipped and displayed by the client browser. I'm sure there are modules on CPAN to gzip a string, but is there some header I need to send in order to tell the browser to unzip the data before trying to display it? I am working in perl 5.6.1 on Red Hat linux 8.0, with apache 1.27, and the application is designed to work in IE 5.0 and later.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: OFT: Gzipping output from a CGI
by perrin (Chancellor) on Nov 30, 2004 at 21:19 UTC | |
by JediWizard (Deacon) on Nov 30, 2004 at 21:31 UTC | |
|
Re: OFT: Gzipping output from a CGI
by gaal (Parson) on Nov 30, 2004 at 21:04 UTC | |
by JediWizard (Deacon) on Nov 30, 2004 at 21:22 UTC | |
by gaal (Parson) on Nov 30, 2004 at 21:32 UTC | |
|
Re: OFT: Gzipping output from a CGI
by Thilosophy (Curate) on Dec 01, 2004 at 08:07 UTC | |
|
Re: OFT: Gzipping output from a CGI
by etcshadow (Priest) on Nov 30, 2004 at 21:35 UTC |