• Can you guys optimize this somehow, as I see 27 separate CSS/JS files included on every page of the website now… can you have some sort of an option in Settings that allows us to enable/disable CSS/JS combining into a single file instead? It would reduce the number of queries and calls and speed up the page load significantly:

    https://prnt.sc/s2j8rv

Viewing 6 replies - 1 through 6 (of 6 total)
  • Yes! Second this!

    Plugin Support Towhid

    (@cryptex_vinci)

    Hi @hastibe @crazyserb

    You can try using Autoptimize. See if it solves your issues:
    https://www.ads-software.com/plugins/autoptimize/

    Thanks

    Thread Starter CrazySerb

    (@crazyserb)

    That’s not what I am asking (or looking) for.

    I know we can use a caching plugin of sorts to minimize/combine all the CSS/JS files, but ALL OF THEM so far have issues with combining the wrong files together as some plugins/scripts just break when combined with others. And that just adds more complexity and trial & error time required to get things working, not addressing the actual issue at hand – this plugin not combining all those files together itself, and having 27 separate resources loaded on every single page.

    That’s 27, again.

    I have never in my decade long WordPress usage seen a single plugin have that many separate calls for resources, ever.

    And anyone who ignores the obvious need for optimization on the plugin developers’ part is not seeing the problem clearly.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @crazyserb

    Thanks for letting us know. We’ve been discussing this and we’ll see if we can push this as major release. For now, I suggest using autoptimize plugin or related script/style minifier plugins.

    Regards,

    Is this page from the Ultimate Member documentation not a solution to this (until the developers have a chance to optimize the JS) ?

    https://docs.ultimatemember.com/article/1490-how-to-remove-css-and-js-on-non-um-pages

    I have implemented this and can confirm that it does stop the code from being referenced on non-UM pages.

    @achangeforbetter — thanks for sharing this! I can’t seem to get it working, though–I have the plugin activated, but it doesn’t have any effect. I set the page ID numbers with their corresponding page URLs as below–do I have some typo below causing it not to work?

    	// Set here IDs of the pages, that use Ultimate Member scripts and styles
    	$um_posts = array(266, 262, 265, 264, 267, 4124, 4127, 263, 261);
    
    	// Set here URLs of the pages, that use Ultimate Member scripts and styles
    	$um_urls = array(
    		'/account/',
                    '/login/',
    		'/logout/',
    		'/members/',
    		'/password-reset/',
    		'/register/',
                    '/register/subscriber',
                    '/register/supporter',
    		'/user/',
    	);

    EDIT: oh, never mind! The UM assets being loaded are just the fonts–the CSS and JS isn’t, as intended! Regardless, if you wouldn’t mind looking and just checking that everything above looks good and letting me know, that would still be appreciated!

    ADDITIONAL EDIT: curiously, if a UM element (e.g. shortcode) is present on a page, it seems like it will still load the CSS and JS, even if I don’t have it on the list of page IDs and URLs that have “Ultimate Member scripts and styles”–this is fine, of course, but is this to be expected?

    • This reply was modified 4 years, 4 months ago by hastibe. Reason: update
    • This reply was modified 4 years, 4 months ago by hastibe. Reason: another addition
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Way too many CSS/JS files included on every page load…’ is closed to new replies.