The JQuery pjax plugin has a default error handler, that will simply reload the target page. This error handler gets called when the timeout has passed, which pjax sets very low. As a result, if your request takes too long, you will see two identical requests. The pjax request (probably with the _pjax attribute set), followed by another non-pjax request. In the browser you will likely see an entire page reload.
One thing I found in my situation, was that the response itself wasn't taking all that long. However, the HTML that was returned included a flash embed. I'm not sure if the pjax code gets its response before or after the flash embed is loaded.
To solve the problem, I changed my PJax code to look like...
$.pjax({
url: xhr.getResponseHeader('Location'),
container: '#container',
timeout: 4000 // pick a suitable timeout
});
Of course, this is calling pjax directly. If you are not calling it directly, you'll have to find a similar solution.
grails.list.js
– Calandracalandria