-
Hi all! |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
Hi 🥬 How long of a delay are you seeing? And does it occur before the transition or after? The best scenario here would be for you to provide a demo link or minimal reproduction so others can help narrow this down. |
Beta Was this translation helpful? Give feedback.
-
Thank you for getting back! Here's two quick, simplified URLs: One running v4, the other running v3. v3: https://a-r-p.co/SWUP/SWUP2 v4: https://a-r-p.co/SWUP You will notice v3 is much faster with page loading, but the code is the same. I've just switched out the SWUP versions. Thank you again for your attention. |
Beta Was this translation helpful? Give feedback.
-
This might have to do with redirects, which are no longer cached in swup 4. The links in your examples point to urls without trailing slash, like |
Beta Was this translation helpful? Give feedback.
-
Thank you for the prompt feedback @daun! That may have helped, but there is still an observable lag and sluggishness on initial load for each page (contrasting with the alacrity and immediacy of v3) -- even with the {preloadVisibleLinks: true} option enabled. SWUP's swift transitioning is a real asset. I'd hate to lose that. Please clear your cache and compare the links again. Any other thoughts, or is it worthwhile to continue with v3 until these issues are addressed in future iterations? Thanks again for quick help. |
Beta Was this translation helpful? Give feedback.
-
In the swup v4 example, there doesn't seem to be any preloading happening at all, judging from the developer tools' network tab. You've included two versions of Preload Plugin, an older one from your server and the current one from a CDN. Try and remove the older/second script tag and see if that restores the preloading. If that's the case, the delay you're seeing is just the preloading not happening because the old Preload Plugin version doesn't work with the new swup version. There's |
Beta Was this translation helpful? Give feedback.
-
D'AH! I forgot to disable those scripts in the functions file! |
Beta Was this translation helpful? Give feedback.
This might have to do with redirects, which are no longer cached in swup 4. The links in your examples point to urls without trailing slash, like
/page1
, which then redirect to the actual urls with trailing slash, like/page1/
. We have implemented some logic to not cache redirected requests – ideally we could only ignore temporary 302 redirects but there's no way to tell so we need to ignore permanent 301 redirects as well. Can you try and see if using the "correct" urls with trailing slashes helps here? We might look into enabling redirect caching for preload requests, or into rewriting the cache url to cache the final url after the redirect.