The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Compress::LeadingBlankSpaces - Perl class to compress leading blank spaces in (HTML, JavaScript, etc.) web content.

DESCRIPTION

This class provides the functionality for the most simple web content compression.

Basically, the outgoing web content (HTML, JavaScript, etc.) consists of many leading blank spaces, because of being structured on development stage. Usually, the client browser ignores leading blank spaces. Indeed, the amount of those blank spaces is big enough, and could be estimated as 10 to 20 percent of the length of regular commercial web page. We can reduce this part of web traffic on busy production servers with no visible impact on transferred web content, especially for those old browsers who do not understand the modern content compression, like gzip format.

The main functionality of this class is concentrated within the squeeze_string member function, which is supposed to be used inside the data transfer loop on server side. The rest of the class is developed to serve possible exceptions, like pre-formatted data within HTML.

In this version of the class, the only one tag produces compression exceptions:

<PRE> ... </PRE>

which is case insensitive in implementation.

INSTALLATION

To install this module type the following:

perl Makefile.PL
make
make test
make install

DEPENDENCIES

This module requires these other modules and libraries:

Perl 5.004 or higher.

AUTHOR

Slava Bizyayev <slava@cpan.org> - Freelance Software Developer & Consultant.

COPYRIGHT AND LICENSE

Copyright (C) 2002 Slava Bizyayev. All rights reserved.

This package is free software.
You can use it, redistribute it, and/or modify it under the same terms as Perl itself.
The latest version of this module can be found on CPAN.

SEE ALSO

C<mod_perl> at F<http://perl.apache.org>

C<Apache::Dynagzip> module can be found on CPAN.