pjax: Set a much higher timeout
Now that pjax has been in osTicket for quite some time, it should be assumed that requests made with pjax will work and a response can be waited for. With a very low timeout of two seconds, operations that take more than two seconds are cancelled via pjax and then re-requested via normal page load. This has the caveat of running large database queries twice, since some long-running ones cannot be cancelled by the database until the first results become available. Therefore, queries which take a while to find the first record (longer than two seconds) will be run twice. Ultimately, the user will have to wait at least twice as long as would ultimately be necessary if the system had just waited for a response from the pjax request. This sets the timeout at a more reasonable value of 30. Perhaps something closer to a minute would be a suitable value? Most users are probably going to click something before 30 seconds expires if they expect a response faster. And that can't be easily fixed.
Loading
Please register or sign in to comment