You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Google Page Speed really doesn't like the 250 kB or so of JS, CSS, Polyfill.js etc. (not counting addons) that load on every page of the website as soon as you enable Give, even on pages where no forms are present. Right now, scripts are loaded in a flat way through Give_Scripts::init().
calling Give_Scripts::public_enqueue_styles() and Give_Scripts::public_enqueue_scripts() inside the shortcodes and widget functions, rather than in Give_Script::init(),
filter the page content after shortcodes have rendered, to search for Give objects, like :
Hello @aurelienpierre, we are working through our backlog of issues - the stale bot is helping us to highlight what is important and what is now stale. Thank you for responding and keeping this issue fresh.
We are currently in the process of overhauling how/where scripts and styles are enqueued, so this is a timely response.
Details
Google Page Speed really doesn't like the 250 kB or so of JS, CSS, Polyfill.js etc. (not counting addons) that load on every page of the website as soon as you enable Give, even on pages where no forms are present. Right now, scripts are loaded in a flat way through
Give_Scripts::init()
.Additional Context
https://developers.google.com/web/updates/2018/07/search-ads-speed
Acceptance Criteria
Hints
There are 2 ways it can be done :
Give_Scripts::public_enqueue_styles()
andGive_Scripts::public_enqueue_scripts()
inside the shortcodes and widget functions, rather than inGive_Script::init()
,The text was updated successfully, but these errors were encountered: