Search code examples
wordpresspageloadlitespeed

Website flashing for a few frames when navigating between subpages while logged in wordpress


The website makes a "flash" when navigating and by that I mean for like two frames when the website reloads, the background is the only thing that remains while the rest of the content is needlessly unloaded.

I have made a video to better showcase this issue by being slowed down.

On the right top, there is my website with the background, right down my website with no background, on the top left my website while not logged in and on the left down a different website with the same theme. From the videos on the right, it can be seen for some time that the background shows up way sooner than the rest of the content and for some reason has to completely regenerate all of the content sent to the client every time while moving between subpages (only retaining the background). While with the videos on the left, at least some of the content is left in which makes the website not "flash" like the ones on the right.

Link to video:

https://drive.google.com/file/d/10AsegBpfePbSeNX1h5OtPlx3IJ32hr3D/view?usp=sharing

The things that may influence website loading are:

  • cloudflare cdn
  • litespeed cache (using ESI groups)
  • autoptimize

I tried disabling basically every plugin and theme (switching to twenty twenty-one) and also enabling development mode and still no success. I also tried resetting litespeed and also nothing.


Solution

  • It was Rocket Loader from Cloudflare. I turned it on as I wanted to boost the Core Web Vitals, but it instead caused this issue.