views:

373

answers:

2

Duplicate:

cakephp stamps execution time as html comment at the bottom of the page, something like

<!-- 4.031 s -->

How can i stop cakephp to output this??

I need to avoid this print because in some ajax queries (that fetch some data and display) i see it (example in an autocomplete where aren't so much results).

+3  A: 

Turn of debugging.

In AJAX heavy apps, I ensure I use the request handler component by putting it in the components list of any controller that will respond to AJAX requests.

var $components = array('RequestHandler');

I then put this the beforeFilter() method of the controller:

if ($this->RequestHandler->isAjax()) {
 Configure::write('debug', 0);
}
Chris Hawes
A: 

Chris has a good solution if you want to keep it around. If you want to permanently remove it, open up app/webroot/index.php and comment out the last 3 lines.

Dooltaz