Return to Snippet

Revision: 11618
at February 11, 2009 11:18 by troynt


Initial Code
function is_ajax()
{
return (isset($_SERVER['HTTP_X_REQUESTED_WITH']) AND
strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest');
}

Initial URL

                                

Initial Description

                                

Initial Title
detect if ajax or json request

Initial Tags
ajax, json

Initial Language
PHP