How to check an Ajax request in cakephp?
- You need to enable the RequestHandler component
var $components = array('RequestHandler');
- Then you check if its an ajax request in your controllers with:
$this->RequestHandler->isAjax()
You can find more information about the RequestHandler component here