Support » Plugin: Popups for Divi » How to remove from pages not using it

  • Resolved sbwd

    (@sbwd)


    I think it’s loading css and js on every page, even the pages where I am not using it.

    Would you consider making it so it only loads on necessary pages for future update?

Viewing 3 replies - 1 through 3 (of 3 total)
  • ausyed

    (@ausyed)

    Hello @sbwd,

    Apologize for the inconvenience!

    I am not sure exactly about the problem but would be easy for me to debug the problem, if you can share me the website URL. Feel free to get back to me, in-case of any query.

    Regards,
    Syed

    Thread Starter sbwd

    (@sbwd)

    Thank you!

    This URL: https://www.scalebloom.com/

    I am not using popup sections on that page.

    But the page still requests the following:
    https://www.scalebloom.com/wp-content/plugins/popups-for-divi/js/front.js?ver=2.2.5
    https://www.scalebloom.com/wp-content/plugins/popups-for-divi/js/ie-compat.js?ver=2.2.5
    https://www.scalebloom.com/wp-content/plugins/popups-for-divi/css/front.css?ver=2.2.5

    Which is increasing page size & requests and slowing down the page.

    By the way, the plugin’s functionality is amazing! So many good uses. Just wish I could resolve this problem.

    Plugin Author Philipp Stracker

    (@strackerphil-1)

    Hi @sbwd

    Thank you for your suggestion! I can see what you mean and why you want to remove those assets.

    We might add a WP-filter, or similar, in the future to give you better control over those assets.

    Implementing a restriction based on usage is not as easy as it might look at first sight: We can easily check if the current page/post contains a Popup, by inspecting the current post-content code.

    BUT you can add a Popup to a template in the Theme Builder (i.e., header/footer) or add a Popup via a theme file (like header.php of the child-theme) and even register dynamic Popups via the JS API.

    Keep in mind: Loading those assets on every page does not impact the performance of your website. The js/CSS files are stored in the browser cache and only loaded on the first visit. Since your website also uses the HTTP/2 protocol, there will be no additional HTTP requests sent.

    You can use a plugin such as Asset CleanUp to manually control the assets that each page should load/not-load.

    I’ll mark this thread as resolved for now, as I have noted the feature request for a closer review (but as explained, it has a low priority right now)
    Let us know if you need any additional help or have feedback on this topic.

    Happy Popup-ing, Philipp 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to remove from pages not using it’ is closed to new replies.