Modified:
12/06/2004
Script ID: #2242
cgi_buffer is a group of libraries (for Perl, Python and PHP) that automatically handle performance-improving HTTP features that most Web servers don't implement (at least for scripts).
Currently, these include:
-HTTP/1.0-style persistent connections, using Content-Length. Persistent connections allow reuse of the TCP connection, making Web browsing much faster and more efficient. Web servers usually handle this for static content (i.e., files), but not for dynamic content;
-ETag generation and validation. ETags allow Web caches (in browsers as well as proxies) to store and validate responses, so that they can be reused; this avoids downloading the entire body when it hasn't changed;
-Gzip Content Compression using Content-Encoding. By compressing the response, it is possible to make browsing perceptibly faster while saving bandwidth at the same time. Almost every modern browser supports this automatically, but Web servers are only beginning to do it (usually with a special module).
cgi_buffer is easy to use - it only requires a one-line include in your script. The Python version can also be used as a wrapper around any other CGI program, enabling the benefits for other languages as well.
License Information
Direct link to this listing: