Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update this wording to reflect the nuanced nature of this situation, … #2526

Merged
merged 1 commit into from
Nov 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions www/experiments/generated-content.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand All @@ -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) [
Expand All @@ -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) [
Expand Down Expand Up @@ -92,24 +92,24 @@ 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(),
"good" => true
);

$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(),
"good" => true
);

$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
Expand Down