• Resolved CarolLeung

    (@carolleung)


    I’m trying to optimize my company website. When I do a performance scan, one of the recommendations say tell me “Combine External CSS”, when I view the details, the three external css files to combine are coming from FVM.

    How would I go about to combine those css files in the settings? I looked at the settings but I could not figure out what I’m looking for.

    You can scan my website at http://tools.pingdom.com and you will see the 3rd issue which is currently a C grade.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Raul P.

    (@alignak)

    You are probably using a cdn to load them, right?
    What’s your site url?

    When you have 3 or more files, it usually means there are files enqueued in the middle.
    For example, if you have 20 js files, but the one on position 7 is using an external domain name, FVM will generate one file for 1 to 6, ignore the 7, and another for 8 to 20.

    There’s an option on the Pro tab that lets you add a domain to the list of external domains that can be merged, just make sure it’s ok to merge it.

    The other option you have, is to dequeue that external file and enqueue it again with lower priority, on your functions.php but you need some coding knowledge, maybe.

    Thread Starter CarolLeung

    (@carolleung)

    Thread Starter CarolLeung

    (@carolleung)

    There is no CDN, we did not set one up

    Thread Starter CarolLeung

    (@carolleung)

    I don’t have any coding knowledge, I’m a graphic web designer, HTML, CSS, Media queries are my specialty

    Plugin Author Raul P.

    (@alignak)

    When you use multiple plugins, they can decide to either enqueue css or js files in the header or footer. Furthermore, they can enqueue files which are mobile only, printing only, or general css files.

    Those 3 css files have a reason.

    You have 2 header files:
    One is your general css code, that plugins are enqueueing in the header.
    The other one is /wp-content/plugins/woocommerce/assets/css/woocommerce-smallscreen.css which loads only, on mobile.

    Those two css files, serve different purposes, so they cannot be merged automatically.
    Woocommerce defined that specific file to load separate from the others, so that’s why FVM obeys the developer guideline and loads it separately too, as intended by the author.

    As for the footer css file, it’s merging 3 css files into that footer file.
    That’s the same principle… authors, specifically chosen to enqueue them in the footer, therefore FVM creates a group for them.
    They usually do this, for css that is not so important to be render blocking.

    In your specific case, the minimum amount of css files is 3, because you have 2 places (header and footer) where plugins are injecting files, plus woocommerce mobile only css file, creating a third file.

    While you cannot merge those further, you can inline them… so head over to the plugin options and mark the inline css code for both the header and footer.

    If your css code is too big, it may trigger another warning about prioritizing visible content… however, the score impact is lower.

    That’s the reason people hire developers to either shrink their css code or merge these files by shifting the orders around, or coding files in a way they can me merged.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Combine External CSS’ is closed to new replies.