Support » Plugin: Max Mega Menu » Unused CSS

  • Resolved mattschofield

    (@mattschofield)


    Hi

    Most exceptional plugin! Thank you.

    I hope you can help. I have 9 active menu locations. The first is Primary menu, and the remaining 8 are presented from shortcode in the specific pages I require them. They contain menu items for all product pages relevant to the product category the visitor is viewing.

    Unfortunately (and obviously) the CSS for all 9 menu locations is called on every page on the site. This means I’m serving 650kb CSS on every page, with approx 630k of it being unused.

    Am I missing any tricks in the plugin that would help me reduce the CSS payload in this usecase?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi Matt,

    Hmm.. I understand the problem, unfortunately I don’t think I’m going to be able to give you the answer you’re looking for. Regarding the 650kb – do you have gzip enabled on your server? If you don’t, please enable that and you should see the transfer size is vastly reduced.

    The other/additional option I can think of would be to have just one menu for all 8 product categories, but use CSS to hide every top level item but the one you want to display for that particular category. The page HTML payload would be higher, but hopefully not as impactful as 8 menus worth of CSS.

    Regards,
    Tom

    Thread Starter mattschofield

    (@mattschofield)

    Tom, thanks. Yes, I’d got gzip enabled but thanks to you asking, found a blush worthy typo for text/css (text/cs ). Now at 47k transfer size. Brilliant.

    I like your 1 menu for 8 idea. I’ll test for gains.

    Thanks again.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Unused CSS’ is closed to new replies.