Reply to Re: [PHP] Re: Reducing size of htm output

Your name:

Reply:


Posted by Dotan Cohen on 10/21/75 11:15

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/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация