Site logo

Archived topic

Menu flashing on page load

3 replies · Started by Scott on September 6, 2021

Viewing posts 1–4 of 4

Hi team

Have recently started having a problem of the primary navigation flashing on half the screen during page load.

This is occurring site-wide and can generally only be repeated if opening a new page from incognito mode either directly entering URL or via Google search.

Any ideas?

Hi Scott,

You may have to refine how WP Rocket optimizes your site.

As it is, it loads the stylesheets of the plugins first before the theme styles.

The necessary styles for the menu items load later than it should because of this, causing that "flash" or layout shift you see.

Thanks Elvin, I've contacted WP Rocket support and fixed it.

Here's the process for anyone else:

1. Disable Optimize CSS Delivery
2. Enable Remove Unused CSS

Nice one! Thanks for sharing it with us. Glad you got it sorted. :D

This archived topic is closed to new replies.