Re: AW: AW: [SMARTY] can we save considerable bandwidth with tidy *and smarty* as well ?
| From: | Valerie Delon | Date: | Mon, 22 Nov 2004 11:44:57 +0000 |
| Subject: | Re: AW: AW: [SMARTY] can we save considerable bandwidth with tidy *and smarty* as well ? | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-11995@lists.php.net to get a copy of this message | ||
yes, from PHP5.
I usually seperate my template into 5 = header.tpl, lefter.tpl,
content.tpl, righter.tpl, and footer.tpl . Or make one that includes
header, lefter and righter... just feel happy that I can use tidy 4 my
smarty template and as Mr. messju said = a bit trickier at
compile-time to reduce server-load
Thanks Mr. messju :)
Valérie Delon
étudiante
--
On a besoin d'apprendre beacoup plus
Quelqu'un croit c'est trop
Mais j'crois que ce n'est pas assez
On Sun, 21 Nov 2004 20:36:30 +0100, Ben <admin@doublebnet.de> wrote:
> am i right that titdy is only implemented in php5?
>
> -----Ursprüngliche Nachricht-----
> Von: Valerie Delon [mailto:valerie17@gmail.com]
> Gesendet: Sonntag, 21. November 2004 19:34
> An: Ben
> Cc: smarty-general@lists.php.net; smarty-dev@lists.php.net
> Betreff: Re: AW: [SMARTY] can we save considerable bandwidth with tidy
> *and smarty* as well ?
>
> http://conf.phpquebec.com/en/archive/conf2004/session#tidy
>
> On Sun, 21 Nov 2004 15:55:26 +0100, Ben <admin@doublebnet.de> wrote:
> > Hi,
> >
> > sorry that this won't be a help, just a question, where can i find
> > this article? phparch? But as i can see in this code snip, the file
> > gets parsed one time by tidy,
> > afterwards by smarty, if you can use it, and all that used code by the
> > php-parser,
> > so do you know sth. about the serverload?
> >
> > Thanks in advance.
> > Ben
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Valerie Delon [mailto:valerie17@gmail.com]
> > Gesendet: Sonntag, 21. November 2004 15:16
> > An: john@php.net
> > Cc: smarty-general@lists.php.net
> > Betreff: [SMARTY] can we save considerable bandwidth with tidy *and
> > smarty* as well ?
> >
> > I'm so excited after reading Mr. John's 2004 PHP Quebec Conference
> > Session about Tidy. I want to use tidy function special for my Smarty
> > template . Can I ?
> >
> > Valérie Delon
> > étudiante
> >
> > --
> > On a besoin d'apprendre beacoup plus
> > Quelqu'un croit c'est trop
> > Mais j'crois que ce n'est pas assez
> >
> > <?php
> >
> > $opts = array("clean" => true,
> > "drop-proprietary-attributes" => true,
> > "drop-font-tags" => true,
> > "drop-empty-paras" => true,
> > "hide-comments" => true,
> > "join-classes" => true,
> > "join-styles" => true);
> >
> > $tidy = tidy_parse_file("php.html", $opts);
> > tidy_clean_repair($tidy);
> >
> > echo $tidy;
> > ?>
> >
> > -rw-rw-r-- 1 john john 27066 Jan 3 04:11 php.html
> > -rw-rw-r-- 1 john john 26193 Jan 3 04:11 php_tidy.html
> >
> > Without losing maintainability, tidy has saved 873 bytes per request
> > That might not seem like a lot, but when you serve 100,000 hits a day
> > you save 87.3 megabytes a day in bandwidth.