• Resolved sdawales

    (@sdawales)


    Hello,

    Is there anyway to remove unused css in autoptimize? I don’t see anything and if not, is there a method that anyone knows about that won’t mess with AO? Thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    AO doesn’t know about that I’m afraid and this might not be easy even for any method, as “unused CSS” also depends on viewport and on browser.

    Interesting idea though ??

    Thread Starter sdawales

    (@sdawales)

    After googling I see a few efforts in respect to this. Unfortunately, it looks like they are still quite complicated which doesn’t really help me. I would however be happy to pay for a plugin that not only optimizes what is loaded but strips out what’s not needed on a page by page basis. It looks like I have a bunch of theme related js/css that I don’t use or may only use on a single page. I am sure I am not the only one but just trying to see what my options are. Here’s one example of a GitHub project; https://github.com/giakki/uncss/issues

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    This will be _very_ unlikely to make it into AO proper any time soon (because it requires code interacting with a headless browser, which almost forces one to use node.js which it not PHP and is typically used in build-mode, not in run-mode).

    But you might want to try one of the plugins (https://www.ads-software.com/plugins/plugin-organizer/ for example) that allow you to disable specific plugins on specific parts of your site, which will also stop those plugins from adding unneeded JS/ CSS?

    hope this helps,
    frank

    Thread Starter sdawales

    (@sdawales)

    Thanks Frank. I’ll look into it. I’ll also be using your Optimizing pro in the near future once I make some mods to my home page. I really must say that through this journey with AO, I’ve learned a lot and thanks you for your always prompt responses and in depth help. Have a great weekend.

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