K
K
Kirill Sharonov2016-01-09 21:05:15
JavaScript
Kirill Sharonov, 2016-01-09 21:05:15

How to make PJAX work in IE11/Edge?

Hello users. Noticed that Pjax (I use with yii2) doesn't work on MS Edge and IE11. In this case, updating information through the Pjax Widget does not occur and does not work correctly. Is there a real way to make it work?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Kirill Sharonov, 2016-08-04
@k_sharonov

Yesterday I checked, in the latest MS Edge in Windows 10 AU everything is already working.

A
Anton, 2016-01-10
@hummingbird

I don't fully understand what exactly you need, but I'll venture a guess:

public function actionIndex()
{
    if (Yii::$app->getRequest()->getIsPjax()) {
        //return $this->redirect(['user/view','id'=>1]); // doesn't forword in IE.
        $this->redirect(['user/view','id'=>1]); // forwards also in IE.
    }

    $searchModel = new UserSearch();
    $dataProvider = $searchModel->search(Yii::$app->request->queryParams);

    return $this->render('index', [
        'searchModel' => $searchModel,
        'dataProvider' => $dataProvider,
    ]);
}

if (Yii::$app->getRequest()->getIsPjax()) {
    return $this->redirect(['user/view','id'=>1], 200); // forwards also in IE.
}

stackoverflow.com/questions/32290181/yii2-and-pjax...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question