My .load ajax function:
1) Click link
2) The requested page loads with a smooth css transition animation (applying/removing body classes)
3) If the page loads faster than 400ms, it should wait before revealing the page by removing the body class
While this functionality works perfectly in my local development environment, on the live server, the ajax page cache overrides the body class transition and abruptly displays the page without adhering to the timer mentioned in point 3.
I have currently found a solution using $.ajaxSetup({ cache: false }); which appends a unique string to the URL to prevent caching. However, I find this method unattractive.
Are there any alternative workarounds available? I could delay loading each page by 400ms, but that approach is not ideal from a performance standpoint :)
Thank you in advance. Tim