Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.58k stars 798 forks source link

Feature Request: Delay JavaScript execution #32368

Open ahegyes opened 1 year ago

ahegyes commented 1 year ago

Impacted plugin

Boost

What

The ability to delay loading JavaScript files until user interaction

How

Jetpack Boost doesn't have a feature to delay JavaScript loading until the first user interaction. Similar features exist in plugins like FlyingPress, WP-Rocket, and the stand-alone plugin Flying Scripts.

When running a Google PageSpeed test, sometimes they would also recommend using one of those plugins for opportunities like Reduce unused JavaScript and Reduce the impact of third-party code (I tried to replicate that but I couldn't right now, but I distinctly remember seeing them advertising WP Rocket for this feature a few months ago).

This feature would be incredibly valuable to reduce the performance impact of 3rd party code like Google Analytics and the Meta Pixel.

ahegyes commented 1 year ago

I got a screenshot of the message: ZhYXPB.png