Other optimization plugins may delay the loading of Optimization Detective's detect.js
and thus break detection
#1890
Labels
[Plugin] Optimization Detective
Issues for the Optimization Detective plugin
[Type] Bug
An existing feature is broken
When I analyzed sites on HTTP Archive which ran Optimization Detective, I encountered some sites that lacked any URL Metrics being collected. When looking further, I found that they were running WP Rocket and that WP Rocket was attempting to lazy-load the
detect.js
script:This breaks the detection logic because (1) the
detect.js
module script is printed in the footer so it will only be loaded when the user scrolls down to the bottom of the page, and (2) detection aborts if it the user is not at the top of the page (since we need to measure what is in the initial viewport).Therefore, I'm opening this task to reach out to WP Rocket to exclude Optimization Detective's
detect.js
script by default. When at WordCamp Asia I also talked with someone who uses PerfMatters to similarly delay loading scripts, so we should check if they have any default patterns for excluding as well.The text was updated successfully, but these errors were encountered: