Comments (2)
Basic app template:
SiteController.php
diff --git a/controllers/SiteController.php b/controllers/SiteController.php
index 33f6227..4c497a8 100644
--- a/controllers/SiteController.php
+++ b/controllers/SiteController.php
@@ -95,6 +95,12 @@ class SiteController extends Controller
]);
}
+ public function actionSleep()
+ {
+ sleep(3);
+ return $this->renderAjax('about');
+ }
+
public function actionAbout()
{
return $this->render('about');
view about.php
diff --git a/views/site/about.php b/views/site/about.php
index 752342c..18220b9 100644
--- a/views/site/about.php
+++ b/views/site/about.php
@@ -17,4 +17,8 @@ $this->params['breadcrumbs'][] = $this->title;
<?= Yii::t('app', 'ru-RU тест') ?>
<code><?= __FILE__ ?></code>
+
+ <?php \yii\widgets\Pjax::begin(['timeout' => 3000]); ?>
+ <a href="/site/sleep">click</a>
+ <?php \yii\widgets\Pjax::end(); ?>
</div>
This code works as expected: clicking on link triggers PJAX request, the client side waits 3 seconds waiting for the response, then navigates to /site/sleep
URL with full page reload.
When I decrease sleep
time in the controller action, PJAX loads the response without page reload.
How to reproduce the problem?
from jquery-pjax.
Sorry. It's my fault.
I've used $.pjax.reload to reload the container. Apparently it uses the default timeout value.
from jquery-pjax.
Related Issues (20)
- Issue with external script and PJAX HOT 4
- full page refresh after redirect HOT 13
- Cannot read property 'push' of undefined HOT 1
- Allow "data-pjax" attribute with no value in handleClick function
- jquery-pjax is unmaintained HOT 2
- "history" option does not count by all code HOT 1
- New version of pjax HOT 5
- Can not work with jQuery3.x HOT 1
- Nested pjax containers load content of external pjax container. HOT 4
- Need update package version on npmjs.com HOT 8
- Create patch release 2.0.7.1 HOT 1
- Version confusion and backward incompatible changes HOT 5
- Form getting submitted multiple time HOT 1
- Event "Complite" calling before "Send" when async: false HOT 1
- Too many form submits HOT 4
- pjax reloads full page where is in modal HOT 1
- Heroku URL incorrect HOT 1
- Problem with nested PJax. Fix. HOT 2
- Wrong events lifecycle in case when ajax request is not async
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-pjax.