How to cache megamenu to prevent loading on mouse over

This topic has 11 replies, 2 voices, and was last updated 3 days, 12 hours ago ago by Jack Richardson

  • Avatar: javi_web
    javi_web
    Participant
    August 18, 2026 at 17:37

    Hello,
    I have made the desktop main menu with static blocks (Elementor). Well, as you can see in attached screenshot, even thought a URL is cached, the menu shows a lot of loading icons and a wrong style for a moment. How can I prevent it?

    I have tried to check “menu cache” (both options) in Xstore’s optimizacion page but it didn’t work. I tested “static block cache” too, but when if I do that a few of static blocks lose its CSS style, so I deactivated it.

    Can you help me?

    Thank you.
    Regards,
    Javi.

    Content is visible for topic creator and
    support staff only.
    Files is visible for topic creator and
    support staff only.
    10 Answers
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    August 19, 2026 at 13:33

    Hello @javi_web,

    We kindly suggest that you consider migrating your current menu in the header to a Mega Menu widget. This will allow you to add custom menu items and assign the appropriate mega menu content, such as static blocks or other mega menu elements, to these items. Alternatively, you may configure your menu items as shown in the following link: https://gyazo.com/739b117930804cfc7c8a31a8b9dfa3ef. Please review the layout of your menu dropdown afterward, as it should enhance the design.

    Best regards,
    Jack Richardson
    The 8Theme’s Team

    Avatar: javi_web
    javi_web
    Participant
    August 19, 2026 at 14:31

    Hello Jack,
    If I understood you well it didn’t work. Same issue happens if I use a Mega menu widget. See attached screenshot.

    Regarding second part I checked I am already using the configuration you suggested me. Isn’t?

    As it is expected, the faster is the bandwidth the less the issue is perceived

    Can you take a look?

    I look forward to hearing from you.

    Thank you.
    Regards,
    Javi

    Content is visible for topic creator and
    support staff only.
    Avatar: javi_web
    javi_web
    Participant
    August 19, 2026 at 14:31

    I forgot the screenshot

    Content is visible for topic creator and
    support staff only.
    Files is visible for topic creator and
    support staff only.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    August 20, 2026 at 07:17

    Hello @javi_web,

    We noticed that you did not set the default width for your mega menu dropdown. This default width serves as a fallback until the script calculates the required width. As a result, we have set it to the width of your first item (1700 value). You can view this here: (https://gyazo.com/e584b4ba08231d23dcf843dfdea72e51).

    However, we have identified a more effective solution by using custom CSS attached to the Menu widget in your header. You can view this here: (https://gyazo.com/a9c0defc66ceb7eff9b4186f187977a0).

    selector .item-design-mega-menu.menu-item .nav-sublist-dropdown {
        left: 50% !important;
        margin-left: -50vw !important;
        margin-right: -50vw !important;
        max-width: 100vw !important;
        position: absolute !important;
        right: 50% !important;
        width: 100vw !important;
    }
    
    selector {
        position: static;
    }

    Please review the frontend result here: (https://gyazo.com/a839b14a4abac60f6f7eb6ab6849f443). We kindly ask you to check it now.

    Best Regards,
    Jack Richardson
    The 8Theme’s Team

    Avatar: javi_web
    javi_web
    Participant
    August 20, 2026 at 10:44

    Hello Jack,
    Thank you for your help. Maybe it improved a little. Now I am working on webserver’s performance. I think it is related with the problem as well. Because, as you can see attached, we has not resolve the time between show the menu and all items are shown.
    If you think that additionally I forgot to activate an option in order to prevent such behaviour, please, let me know.

    Thank you.
    Regards,
    Javi.

    Avatar: javi_web
    javi_web
    Participant
    August 20, 2026 at 10:44

    Ups. I forgot attach screnshots

    Avatar: javi_web
    javi_web
    Participant
    August 20, 2026 at 10:45

    Take a look

    Files is visible for topic creator and
    support staff only.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    August 20, 2026 at 11:28

    Hello @javi_web,

    The functionality for lazy-loading images on your website is managed by an additional plugin that detects when non-loaded images come into view, such as when hovering over menu items and displaying sections with images. These images are then loaded all at once. The plugin you are using for lazy-loading is Imagify. Since you have a paid version of this plugin, we kindly request that you contact the plugin’s support team for assistance with settings that allow you to exclude certain images in specific sections, such as static blocks in the menu, as the plugin’s author is most familiar with their code. Thank you for your understanding.

    Best regards,
    Jack Richardson
    The 8Theme’s Team

    Avatar: javi_web
    javi_web
    Participant
    August 20, 2026 at 13:10

    Hello Jack,
    Thank you, I will contact with wprocket support team about the images.
    But, what about the Elementor widget “Product lists categories”? If I checked “cache menu” from xStore’s optimization options, should be it preloaded?

    Thank you.
    Regards,
    Javi.

    Files is visible for topic creator and
    support staff only.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    August 20, 2026 at 13:20

    Hello @javi_web,

    No, this Categories widget is not a menu widget and will not be preloaded if you enable the Menu cache option, as it is a completely separate taxonomy request that is not related to the menu query.

    Best regards,
    Jack Richardson
    The 8Theme’s Team

  • Viewing 11 results - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.