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 ??