INN / umbrella-ghn

Umbrella repository for Georgia Health News
GNU General Public License v2.0
0 stars 1 forks source link

Optimize CSS & JS for Goliath theme #3

Open MirandaEcho opened 4 years ago

benlk commented 4 years ago
benlk commented 4 years ago

a.back-to-top has a weird bug where, after any scroll, the inline opacity: style is repeatedly set to a number that fluctuates wildly between 0 and 1, and continues fluctuating after the page is scrolled. Can we patch that JS or remove it?

benlk commented 4 years ago

Installing https://wordpress.org/plugins/autoptimize/ to concatenate the CSS into a single network request, and to enable lazy-loading of images, and to aggregate JS files, got my local site from a 39 to 65 on Chrome's devtools Lighthouse audit on mobile:

Screen Shot 2020-04-15 at 13 58 06 Screen Shot 2020-04-15 at 13 58 20

benlk commented 4 years ago

Particle background has a checkbox at Customizer > Background > Enable active particle background, which can be disabled. The JS is already built to check for that. The CSS is five lines; not worth the effort to spin off into its own stylesheet.

benlk commented 4 years ago

Plugin installed on staging, with the following changes to the default configuration, in Settings > Autoptimize:

Particle background disabled.

joshdarby commented 4 years ago

It's probably worth noting that they have a plugin installed and activated named WP Minify which supposedly minifies css and js. I'd say we can probably remove it since we're going with Autoptimize.

benlk commented 4 years ago

That plugin didn't seem to be doing anything, which is what led me to Autoptimize. I've disabled WP Minify on staging.