How do I check if the request is an AJAX? I am using CodeIgniter. I have a link that when it clicked, it\'ll open the pop-up dialog window this is done through ajax it reque
if(!$this->input->is_ajax_request()){ // check if request comes from an ajax
redirect(site_url('home'),'refresh'); // if the request is not coming from an ajax redirect to home controller.
}