From 712b8cd231f72da2f918652c05a0f3c9a7f93957 Mon Sep 17 00:00:00 2001 From: Scott Jehl Date: Tue, 8 Nov 2022 16:41:12 -0500 Subject: [PATCH] Update this wording to reflect the nuanced nature of this situation, which is often but not always due to javascript over-reliance related to #1945 but not a fix --- www/experiments/generated-content.inc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/www/experiments/generated-content.inc b/www/experiments/generated-content.inc index 18ff9c3ad5..67f71704a0 100644 --- a/www/experiments/generated-content.inc +++ b/www/experiments/generated-content.inc @@ -23,11 +23,11 @@ if (isset($genContentSize) && isset($genContentPercent)) { $genContentPercent = floatval($genContentPercent); if ($genContentSize > .5 || $genContentPercent > 1) { - $amtNote = "(" . $genContentSize . "kb, " . $genContentPercent . "% of total HTML)"; + $amtNote = "(" . $genContentSize . "kb larger, or " . $genContentPercent . "% of total HTML)"; $assessment["Quick"]["opportunities"][] = array( - "title" => 'A significant portion of HTML content ' . $amtNote . ' was generated by JavaScript after delivery.' , - "desc" => 'When critical HTML content is generated with JavaScript in the browser, several performance bottlenecks can arise:', + "title" => 'Final HTML (DOM) size is significantly larger than initially delivered HTML ' . $amtNote . '.' , + "desc" => 'Typically this is due to over-reliance on JavaScript for generating content, but increases can also happen as a result of browsers normalizing HTML structure as well. When critical HTML content is generated with JavaScript in the browser, several performance bottlenecks can arise:', "examples" => array( "Before content can be generated client-side, the browser must first parse, evaluate, and sometimes also request JavaScript over the network. These steps occur after the HTML is initially delivered, and can incur long delays depending on the device.", "If the generated HTML contains references to external assets (images for example), the browser will not be able to discover and request them as early as desired." @@ -46,8 +46,8 @@ if (isset($genContentSize) && isset($genContentPercent)) { ); $assessment["Usable"]["opportunities"][] = array( - "title" => 'A significant portion of HTML content ' . $amtNote . ' was generated by JavaScript after delivery.' , - "desc" => 'When critical HTML content is generated with JavaScript in the browser, it can increase the time it takes for content to be made accessible to assistive technology such as screen readers.', + "title" => 'Final HTML (DOM) size is significantly larger than initially delivered HTML ' . $amtNote . '.' , + "desc" => 'Typically this is due to over-reliance on JavaScript for generating content, but increases can also happen as a result of browsers normalizing HTML structure as well. When critical HTML content is generated with JavaScript in the browser, it can increase the time it takes for content to be made accessible to assistive technology such as screen readers.', "examples" => array(), "experiments" => array( (object) [ @@ -60,8 +60,8 @@ if (isset($genContentSize) && isset($genContentPercent)) { ); $assessment["Resilient"]["opportunities"][] = array( - "title" => 'A significant portion of HTML content ' . $amtNote . ' was generated by JavaScript after delivery.' , - "desc" => '"When critical HTML content is generated with JavaScript in the browser, there is an increased risk of delivering that content successfully. Common issues such as JavaScript errors and third-party network delays and outages can present potential single points of failure."', + "title" => 'Final HTML (DOM) size is significantly larger than initially delivered HTML ' . $amtNote . '.' , + "desc" => 'Typically this is due to over-reliance on JavaScript for generating content, but increases can also happen as a result of browsers normalizing HTML structure as well. Common issues such as JavaScript errors and third-party network delays and outages can present potential single points of failure.', "examples" => array(), "experiments" => array( (object) [ @@ -92,7 +92,7 @@ if (isset($genContentSize) && isset($genContentPercent)) { ); } else { $assessment["Quick"]["opportunities"][] = array( - "title" => 'HTML content was mostly generated server-side.', + "title" => 'Final HTML (DOM) size is not significantly larger than the initial HTML.', "desc" => "When critical HTML content is generated with JavaScript in the browser, several performance bottlenecks can arise.", "examples" => array(), "experiments" => array(), @@ -100,7 +100,7 @@ if (isset($genContentSize) && isset($genContentPercent)) { ); $assessment["Usable"]["opportunities"][] = array( - "title" => 'HTML content was mostly generated server-side.', + "title" => 'Final HTML (DOM) size is not significantly larger than the initial HTML.', "desc" => "When critical HTML content is generated with JavaScript in the browser, it can increase the time it takes for content to be made accessible to assistive technology such as screen readers.", "examples" => array(), "experiments" => array(), @@ -108,8 +108,8 @@ if (isset($genContentSize) && isset($genContentPercent)) { ); $assessment["Resilient"]["opportunities"][] = array( - "title" => 'HTML content was mostly generated server-side.', - "desc" => "When critical HTML content is generated with JavaScript in the browser, there is an increased risk of delivering that content successfully. Common issues such as JavaScript errors and third-party network delays and outages can present potential single points of failure.", + "title" => 'Final HTML (DOM) size is not significantly larger than the initial HTML.', + "desc" => "When final HTML (DOM) size is significantly larger than initial HTML, it can reflect an over-reliance on JavaScript for generating content. Common issues such as JavaScript errors and third-party network delays and outages can present potential single points of failure.", "examples" => array(), "experiments" => array(), "good" => true