Support » Plugin: Clearfy – WordPress optimization plugin and disable ultimate tweaker » Compatibility questions with Plugin Organizer

  • Resolved martinneumannat

    (@martinneumannat)


    I have added Plugin Organizer to my site, which allows me to disable plugins depending on the page URL and many other parameters. Sincerely, you should consider adding this to clearfy, it would combine very well!
    https://wordpress.org/plugins/plugin-organizer/

    My question is about the aggregate CSS functionality of Clearfy. If Clearfy finds a script that is loaded on one page but not on another, how does it handle the aggregation of that? Also the Assets manager of Clearfy itself allows to disable scripts on certain pages. How is that handled with aggregation? Just want to understand that in order to make more intelligent optimization decisions.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @martinneumannat!

    In fact our “Assets Manager” does just that. You can disabled certain CSS or JS or both (also on plugin basis) on specified pages. On those pages Clearfy doesn’t aggregate missing scripts and styles as it’s not registered via hooks.

    Did I correctly understand you question?

    By the way, you can get faster support here: http://forum.webcraftic.com


    Regards,
    Alex

    Thread Starter martinneumannat

    (@martinneumannat)

    I want to understand that a bit more in detail.
    Lets do an example.
    I have a homepage where I enable some CSS and disable some other who are not needed. The Assets Manager will join them all into one CSS, since I have enabled the option to aggregate the CSS.
    Now in page 1 lets say I disable one CSS that is not needed. What does the Assets manger do with that? The most optimized approach would be to reuse the same CSS from the frontpage, since it is already in the browser cache, even if it includes things that are not needed.
    In page 2 I am adding 2 more CSS that a plugin is needing. What does Assets Manager do? We could use the CSS from the homepage and add a second file with the missing CSS, in order to avoid reloading everything.

    Now confirm for me how does Assets Manager handle those cases in reality?

    Hi @martinneumannat!
    Sorry for late response. As for your question…

    The plugin will generate a new file for each different “combination” of enqueued styles. You can’t cache part of the file, the web server is caching contents related to filename. If the contents of specific filename are changed — it’s a new file for the web server.

    Long story short, in your case the plugin will generate three different files and serve them on different pages. Your browser will cache three of them (the hash in the filename will be different).

    Do you have further questions?


    Regards,
    Alex

    Thread Starter martinneumannat

    (@martinneumannat)

    OK, thanks for clarifying. In this case I will stop to do too many optimizations. Otherwise I will end up with a different CSS file for every page, instead of being able to reuse the same CSS on all pages. Because if all pages could share the same CSS, there is no need to cache 3 different files.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Compatibility questions with Plugin Organizer’ is closed to new replies.