• Resolved xwhitesky

    (@xwhitesky)


    This is a suggestion not support topic.

    I know an admin should be able to figure this out, but it would be cool if Hummingbird recommends or labels scanned assets to be combined, based on whether it’s a front-end/public asset. So that way, it wouldn’t combine stuff that normally only appears in the back-end or to admins only (yoast-admin-bar.css etc) that regular users don’t need to load, shaving off the combined filesize. Or, you could add it to the Filters, which now only has By Plugin or Theme.

    So the next is an advanced idea and may turn out to be too cumbersome but here we go..

    What if as a Pro feature you can group combined assets (public, admin, etc), which would cache a separate combined file for each group, and then even conditionally deploy them with set rules. For example, deploy a combined group “if user is admin” or “post/page = __” etc. A good case example here is if we have a fancy page that uses a lot of third-party assets, and we only load that combined file with a page rule.

    I suppose that could get a bit troublesome though with pages/posts being updated or deleted, easy to lose track. Perhaps it would have to reflect both on the Asset Optimization page, and also on the post edit pages themselves – like a little block that shows “Combined assets being used here: blah.min.css, blah2.min.css”. Or if none being used yet, could select from a dropdown all the available groups that we made on the Asset Optimization page. Then likely, groups that aren’t being used by any pages/posts at all would have to be flagged back on the Asset Optimization page “Not Being Used” for periodic review and removal.

    Thanks for reading!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Dmytro – WPMU DEV Support

    (@wpmudevsupport16)

    Hi there @xwhitesky

    Thanks for the suggestions! I’ll definitely pass them on to the developers so they can chew on ’em. ??

    Cheers!
    Patrick

    Hi @xwhitesky,

    The asset optimization engine should actually be doing all that.

    In the module you have a list of all the files that Hummingbird was able to detect. And you add options to those files. For example, you know that you always want some scripts to be served from footer, some always combined and so on. Now when the user visits a page, Hummingbird will start processing the assets on the page and it will try to group them. That means if it’s an admin, he’ll get a bundle with yoast-admin-bar.css, if it’s a normal user, there will be a bundle without that file.

    It even goes beyond that. Let’s say you selected to combine ALL files. Obviously, it is not always possible – some files are in the header, some in the footer. Some have conditional loading, some are loaded only on LTR mode. Hummingbird will take all that into account and create groups of files that can be safely combined together. So even though you’ve selected to combine all, you’ll end up with 2-3 files that are safe to combine together for that specific user on that specific page.

    Does it make sense?

    Best regards,
    Anton

    Thread Starter xwhitesky

    (@xwhitesky)

    Hey Anton,
    First, thanks for such a detailed and thorough explanation – really impressed! Also, wow I had no idea Hummingbird already does that behind the scenes! Unless I’ve somehow missed it, I didn’t see any explanation that this happens, either on the Asset Optimization page or on the plugin’s summary page here at www.remarpro.com. No biggie, but IMHO I think this is a pretty powerful feature and something to boast about or make evident – I would consider mentioning it somewhere ??

    Right now, I unchecked all the files which are used only sometimes or for admins, so I’ll go ahead and combine everything and purge the cache/minified assets so I can test further.

    One of the reasons I left working with WordPress years ago was the highly fragmented nature of the platform when combined with themes and many plugins, causing a rubber band ball which can break easily.

    I’m lured now towards just getting a WPMU membership and keeping everything “same-provider” so no more of those headaches!

    Thanks
    -Robert

    Thanks ?? We’ll try to adjust the descriptions so it’s more clear

    One of the reasons I left working with WordPress years ago was the highly fragmented nature of the platform when combined with themes and many plugins, causing a rubber band ball which can break easily.

    Yeah. It also depends on how a site is done. Many popular plugins play nice with each other, but once a site starts using more than 20-30 plugins, it’s a bit too much to keep up with and issues start to pop up. Especially when you start optimizing asset on such sites, it’s not always a straightforward process, even though the Asset Optimization engine tries to be “intelligent”, sometimes it takes a bit of adjusting and playing around with settings.

    Best regards,
    Anton

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Suggestion about combining/grouping assets’ is closed to new replies.