is there a way to differentiate ajax call and normal browser request in php (or codeigniter to be specific)?
this is my jquery ajax call:
$(document).ready(function() {
$('#container').load('http://localhost/index.php/customer/');
});
this is the index method of customer controller in codeigniter:
public function index() {
//if (call == 'ajax request')
// do this if it's an ajax request;
//else
// do that if user directly type the link in the address bar;
$this->load->view('customer/listview');
}
any help would be appreciated. thanks.
CodeIgniter way..