wp-rocket icon indicating copy to clipboard operation
wp-rocket copied to clipboard

As a user, I want the homepage preloaded with accurate OCI data upon fresh activation.

Open MathieuLamiot opened this issue 1 year ago • 2 comments

Context Follow-up of #6697. In the current warm_up behavior, it can happen that the SaaS browse the homepage (desktop and mobile) before WP Rocket is fully activated, hence on those visits, our callbacks to inject the beacon are not yet registered. Those visits don't result in LCP/ATF data being saved in DB.

Expected behavior

  • When the SaaS visits for homepage (desktop and mobile) happen for LCP/ATF warm_up after a fresh activation, WP Rocket callbacks must be registered already in WP so that the beacon is injected.
  • When preloading the homepage (desktop and mobile) after a fresh activation, the preload must generate cache for homepage desktop/mobile with accurate OCI data (coming from the SaaS Warmup visits).

Acceptance Criteria When I activate the plugin (consider also fresh installations):

  • The SaaS must visit the homepage for desktop and mobile.
  • Beacon must be injected and fully completed for those visits so that data is in the OCI table.
  • The homepage must be preloaded for desktop and mobile.
  • The generated cache must contain the OCI optimization for desktop and mobile

Additional information https://wp-media.slack.com/archives/CUT7FLHF1/p1719492413110199?thread_ts=1719482180.104929&cid=CUT7FLHF1

MathieuLamiot avatar Jun 27 '24 13:06 MathieuLamiot

When handling this issue, we need to refactor this method:

https://github.com/wp-media/wp-rocket/blob/7df15529f858b1da9fd3a2127f7b4b96664f99d5/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php#L242-L249

To remove doing the version check and just change the default value for mobile options to be 1 instead of 0.

Slack discussion: https://wp-media.slack.com/archives/CUKB44GNN/p1719824617612169?thread_ts=1719823420.166129&cid=CUKB44GNN

wordpressfan avatar Jul 01 '24 09:07 wordpressfan

To be checked here : update from <3.16 to PR , will warmup home + 10 links as desktop and mobile (currently on 3.16.4, home mobile is not warmedup and not added to WPR logs nor DB)

Mai-Saad avatar Aug 20 '24 09:08 Mai-Saad