Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Test If Called From XMLHttpRequest

DZone's Guide to

Test If Called From XMLHttpRequest

· ·
Free Resource

if($_SERVER["HTTP_X_REQUESTED_WITH"] == 'XMLHttpRequest')
{
  // Called from XMLHttpRequest
}
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}