> Christian Heiss wrote:
>
> >sub Script_OnFlush {
> > if($Response->{ContentType} eq 'text/html') {
> > my $data = $Response->{BinaryRef};
> > $$data =~ s/(.*?)(\<title.*?\/title\>)(.*?)(\<title.*?\/title\>)/$1$4$3/isg;
> > $$data =~ s/(.*?)(\<META name="description".*?\>)(.*?)(\<META
>name="description".*?\>)/$1$4$3/is;
> > $$data =~ s/(.*?)(\<META name="author".*?\>)(.*?)(\<META
>name="author".*?\>)/$1$4$3/is;
> > $$data =~ s/(.*?)(\<META name="keywords".*?\>)(.*?)(\<META
>name="keywords".*?\>)/$1$4$3/is;
> > $$data =~ s/(.*?)(\<META name="date".*?\>)(.*?)(\<META
>name="date".*?\>)/$1$4$3/is;
> > $$data =~ s/(.*?)(\<link rel="stylesheet".*?\>)(.*?)(\<link
>rel="stylesheet.*?\>)/$1$4$3/is;
> > $$data =~ s/\<!-- end_header.*?\<body.*?\>//is;
> > $$data =~ s/\<\/body.*?\/html\>//is;
> > $$data =~ s/\<!-- end_footer.*//is;
> > $$data =~ s/\<font.*?\>//isg;
> > $$data =~ s/\<\/font.*?\>//isg;
> >}
Scary. Generally, be wary of .* and .*? type expressions.
I'd recommed the good book "Mastering Regular Expressions".
> All works fine, but my problem is, that with this configuration the server is very
>slowly.
> In the background I'm using a MySQL-Database to get some data. And when I connect to
>it,
> it needs up to 8 seconds to get my request on the browser (in the LAN)...
> If I change my search and replace statements to less, it is really fast!!!
>
If you are trying to compress your HTML, I would recommend using the
CompressGzip or Clean settings which do this for you. CompressGzip
will probably work the best if this is your goal. If you just want
to tidy up your HTML, I might use a Clean setting at a high level ( 9? )
-- Josh
_________________________________________________________________
Joshua Chamas Chamas Enterprises Inc.
NodeWorks <- Web Link Checking Huntington Beach, CA USA
http://www.nodeworks.com 1-714-625-4051
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]