My favorites | Sign in
Project Logo
             
Search
for
Updated Aug 29, 2008 by lange-hegermann@tacodocs.com
FAQ  

FAQ

1. How can I detect an AJAX request in my server-side scripts?

Like mootools and prototype, microajax sets the X-Requested-With header to XMLHttpRequest. This should be easy to detect.

PHP:

if ($_SERVER['X-Requested-With'] == 'XMLHttpRequest') {
  // do something clever
}

Sign in to add a comment
Hosted by Google Code