Re: Re: Reducing size of htm output

From: Date: Sat, 07 May 2005 10:46:15 +0000
Subject: Re: Re: Reducing size of htm output
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-214666@lists.php.net to get a copy of this message
On 5/7/05, M. Sokolewicz <tularis@php.net> wrote: > Rory Browne wrote: > > > First of all as Rasmus said, this 'compression' is barely(if at all) > > going to make a difference, after your pages have been compressed wth > > gzip, > > > > There are two reasons for this: > > 1 compression techniques detect repeated strings(such as spaces or > > newlines), and replaces them with one instance of that string, and a > > record of how many times it appears. > > 2 Because Rasmus said so, and considering his long-time involvement > > with the php project(as founder), he probably knows what he'e talking > > about. > > > > What might be more useful is stripping out comments, If you don't use > > javascript it is simply a case of replacing all <!-- anything --> with > > a blank space. If you do though it's more complicated since it is > > considered good practice to place js inside <!-- .. //--> blocks, > > excuse me? since when is this considered /good/ practice??? > It's one of those things that are concidered /bad/ practice according to > w3... Stripping out the comments from the source (file.php) is bad. But I see no reason why not to strip them out from the output to the user. Most users would never see them. And those that would- are probably trying to reverse-engineer your site anyway. For debugging, you could simply comment out the comment-parser. Dotan Cohen http://LyricsList.com/ http://Music-Liriks.com/

« previous php.general (#214666) next »