如何知道Colorbox是否打开了PHP页面?

I know the PHP code should be somthing like this:

if(!empty($_GET['isajax']) || !empty($_POST['isajax'])) $isajax=TRUE; else $isajax=FALSE;
if(!$isajax){
//load header
}

I need to know how i can edit Colorbox script to automatically send "isajax" on each AJAX request.

I have added

$.extend(settings.data, {isajax:'yes'});

Before

$loadingBay.load(href, settings.data, function (data, status, xhr) {
                prep(status === 'error' ? $tag(div, 'Error').text('Request unsuccessful: ' + xhr.statusText) : $(this).contents());
            });

But does not work.

jQuery does this for you already.

In PHP, check for the following property...

if ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
    // requested via AJAX
}