If you are using a library that sends the X-Requested-With
header, then you can do…
if (strtolower(filter_input(INPUT_SERVER, 'HTTP_X_REQUESTED_WITH')) === 'xmlhttprequest') {
// I'm AJAX!
}
More Related Contents:
- I want to use jquery nested sortable plugin with drag and drop in codeigniter using mysqli
- Retrieve JSON POST data in CodeIgniter
- Codeigniter CSRF valid for only one time ajax request
- How to make search query like Youtube? [closed]
- how to use json_encode for my output?
- Can anyone help me what is wrong in this code ajax using with php? [closed]
- CodeIgniter – foreach loop
- How to use query string in Codeigniter?
- Send JavaScript variable to PHP variable [duplicate]
- Laravel csrf token mismatch for ajax POST Request
- Using Jquery Ajax to retrieve data from Mysql
- How to load a controller from another controller in codeigniter?
- CodeIgniter: Create new helper?
- CodeIgniter htaccess and URL rewrite issues
- Change DIV content using ajax, php and jQuery
- Uploading in Codeigniter – The filetype you are attempting to upload is not allowed
- How to load PHP file into DIV by jQuery?
- Grouping WHERE clauses in Codeigniter
- Submitting JSON data via JQuery ajax.post to PHP
- How to integrate WordPress template with CodeIgniter
- Ajax push system
- CodeIgniter activerecord, retrieve last insert id?
- How to set cron job URL for CodeIgniter?
- PHPExcel download using ajax call
- Advantages / Disadvantages of pconnect option in CodeIgniter
- Insert data through ajax into mysql database
- Codeigniter assets folder best practice
- Call PHP function from jQuery?
- How to Load Ajax in WordPress
- How can you use php in a javascript function [duplicate]