Skip to content

Instantly share code, notes, and snippets.

@dhrrgn
Created May 19, 2014 16:30
Show Gist options
  • Select an option

  • Save dhrrgn/f9b8774507d89e1dcd1d to your computer and use it in GitHub Desktop.

Select an option

Save dhrrgn/f9b8774507d89e1dcd1d to your computer and use it in GitHub Desktop.
Function for determining if a request is a Pjax request.
<?php
function is_pjax()
{
return array_key_exists('HTTP_X_PJAX', $_SERVER) || array_key_exists('_pjax', $_GET);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment