Skip to content

Commit

Permalink
fixes #2108 by not showing the experiment for adding fetchpriority fo…
Browse files Browse the repository at this point in the history
…r LCP if already using the hint
  • Loading branch information
tkadlec committed Jul 11, 2022
1 parent 6560353 commit b7931d2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions www/experiments/lcp.inc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
$isBG = true;
}
}


$expsToAdd = array();
$expsToAdd[] = (object) [
Expand All @@ -64,10 +64,8 @@
"expval" => array($lcpSource . "|as_image"),
"explabel" => array($lcpSource)
];


// priority Hints only help for foreground images
if( !$isBG && !$isVideo ){
if( !$isBG && !$isVideo && isset( $lcp['element']['fetchPriority']) && $lcp['element']['fetchPriority'] != 'high' ){
$expsToAdd[] = (object) [
"id" => '011',
'title' => 'Add Priority Hint',
Expand Down

0 comments on commit b7931d2

Please sign in to comment.