Hi Bill,
I'm using the PageSpeed Plugin (from Google) in Firebug for Firefox. This
plugin measures the page speed and gives you some hint, how you can increase
the performance of your site.
And Google said, that they will also evaluate your page speed/performance
for page ranking because they want to make a faster internet.
One of the hints hint was, to minify the HTML source. So I did it and now
I've managed to get 100 points of 100 J
I'm also compressing with gzip (done by Apache), which is also a hint on
PageSpeed.
I think the combination of both is the best, because gzip compresses the
whole file to send over the net. And minify reduces the content which the
browser has to parse (also removes comments).
Stefan
use HTML::Packer;
use JavaScript::Packer;
use CSS::Packer;
my $html_packer = HTML::Packer->init();
sub process {
my ( $self, $c ) = @_;
my $rendered = $self->render($c, $c->stash->{template});
my $opts = {
remove_comments => 1,
remove_newlines => 1,
html5 => 1,
do_javascript => 'best',
do_stylesheet => 'minify',
};
$html_packer->minify( \$rendered, $opts );
$c->response->body($rendered);
}
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/