Answers for "how to find if a request is xhr"

PHP
2

check if ajax request php

if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
	/* special ajax here */
	die($content);
}
Posted by: Guest on August-31-2020

Browse Popular Code Answers by Language