/ Published in: PHP
Quick and easy way to determine if the HTTP request is an AJAX call or a standard call. Supports the notion of Unobtrusive JavaScript.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function isAjax() { && ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest')); }
URL: http://www.gmarwaha.com/blog/category/client-side/javascript/