Pjax Use On Controller Side

Hello dears,

My question is about the use of Pjax in controllers.

Currently my controller is written like that to respond to a PJAX action :

public function actionActivePartial()


    $model = new Sample(Yii::$app->session->get('bizid'), 'parameter1');

    return $this->renderPartial('sampleActive', array('sample'=>$model));


My question is how to determine if the call is a PJAX call or a "normal" call.

For example, in case of a PJAX call the URL will be updated like that :


My problem : when refreshing the page only the partial view is rendered.

Does someone have any solution or any best practice for coding PJAX actions in controllers ?