Re: Disadvantages of output buffering

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, June 26, 2007 7:33 am, Emil Edeholt wrote:

> My php project would get a much cleaner code if I could set cookies
> anywhere in the code. So I thought of output buffering. But I can't
> find
> any articles on the cons of output buffering. I mean it most be a
> reason
> for it being off by default?

Main reason to be off by default is backwards compatibility.

Depending on your PHP, HTML and/or CSS and browser rendering, output
buffering can also make a site "seem" slow since it buffers up all the
output until the page is complete.

But you'd have to have some pretty heavy lifting in PHP buried in the
middle of the HTML output for that to be meaningful.  That's usually a
bad Design decision, but there might be some cases where it's
relevant.

There also have been a lot of benchmarks to prove buffering was
better/worse/faster/slower.  You're on your own about which ones to
believe.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux