<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>https://web.dev/</id>
  <title>Leena Sohoni on web.dev</title>
  <updated>2026-04-15T23:21:06Z</updated>
  <author>
    <name>Leena Sohoni</name>
  </author>
  <link href="https://web.dev/authors/leenasohoni/feed.xml" rel="self"/>
  <link href="https://web.dev/"/>
  <icon>https://web-dev.imgix.net/image/vgdbNJBYHma2o62ZqYmcnkq3j0o1/VXCjCzLEGWApTkZkNZkR.JPG?auto=format</icon>
  <logo>https://web.dev/images/shared/rss-banner.png</logo>
  <subtitle>Freelance technical analyst and writer</subtitle>
  
  
  <entry>
    <title>What&#39;s new in PageSpeed Insights</title>
    <link href="https://web.dev/whats-new-pagespeed-insights/"/>
    <updated>2021-11-03T00:00:00Z</updated>
    <id>https://web.dev/whats-new-pagespeed-insights/</id>
    <content type="html" mode="escaped">&lt;p&gt;Over the years, &lt;a href=&quot;https://pagespeed.web.dev/&quot; rel=&quot;noopener&quot;&gt;PageSpeed
Insights&lt;/a&gt; (PSI) has
evolved into a one-stop source for both
&lt;a href=&quot;https://web.dev/speed-tools/#field-data&quot;&gt;field&lt;/a&gt;
and
&lt;a href=&quot;https://web.dev/speed-tools/#lab-data&quot;&gt;lab data&lt;/a&gt;.
It integrates information from the
&lt;a href=&quot;hhttps://developer.chrome.com/docs/crux/&quot; rel=&quot;noopener&quot;&gt;Chrome UX Report&lt;/a&gt;
(CrUX) and &lt;a href=&quot;https://developer.chrome.com/docs/lighthouse/overview&quot; rel=&quot;noopener&quot;&gt;Lighthouse&lt;/a&gt;
diagnostics to provide insights that help improve the performance of your
website.&lt;/p&gt;
&lt;p&gt;Today, we are excited to announce an updated version of PSI! While it is a
critical element in our &lt;a href=&quot;https://web.dev/vitals-tools/&quot;&gt;speed tooling suite&lt;/a&gt;,
the PSI code base was ten years old, contained a lot of legacy code, and was due
for a redesign. We used this as an opportunity to address interface-related
issues in PSI which have sometimes made it difficult for users to navigate the
report. Our primary goals were to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Make the UI more intuitive by clearly differentiating between data
derived from a synthetic environment and data collected from users in the
field.&lt;/li&gt;
&lt;li&gt;Clearly communicate how the &lt;a href=&quot;https://web.dev/vitals/&quot;&gt;Core Web Vitals&lt;/a&gt; assessment is calculated in the UI.&lt;/li&gt;
&lt;li&gt;Modernize the look and feel of PSI, leveraging &lt;a href=&quot;https://material.io/design&quot; rel=&quot;noopener&quot;&gt;Material Design&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This post introduces the new features in PSI which will be released later this
year.&lt;/p&gt;
&lt;h2 id=&quot;whats-new&quot;&gt;What&#39;s new? &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/whats-new-pagespeed-insights/#whats-new&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The PSI UI redesign aims to improve the presentation of the report data and add
clarity and granularity to the data available in the report. The new UI is aimed
to be more intuitive and helps developers quickly discover lab and field
performance insights for their pages. The fundamental changes to the UI
include:&lt;/p&gt;
&lt;h3 id=&quot;clear-separation-of-field-and-lab-data&quot;&gt;Clear separation of field and lab data &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/whats-new-pagespeed-insights/#clear-separation-of-field-and-lab-data&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;We have changed the UI to distinctly separate field data from lab data. Labels
for &amp;quot;Field Data&amp;quot; and &amp;quot;Lab data&amp;quot; have been replaced with text that indicates what
the data means and how it can help. We have also brought the Field data section
to the top. The traditional lab-based performance score, which is currently
shown at the top, has been moved down to the Lab data section to avoid ambiguity
about the origin of the score.&lt;/p&gt;
&lt;aside class=&quot;aside flow bg-state-info-bg color-state-info-text&quot;&gt;&lt;div class=&quot; flow&quot;&gt; If you don&#39;t know the difference between lab and field data, check out the &lt;a href=&quot;https://web.dev/how-to-measure-speed/&quot;&gt;explainer on web.dev&lt;/a&gt;. &lt;/div&gt;&lt;/aside&gt;
&lt;figure&gt;
&lt;img alt=&quot;discover what your real users are experiencing&quot; decoding=&quot;async&quot; height=&quot;436&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jM0GYMrQZcPymVXdLOLP.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jM0GYMrQZcPymVXdLOLP.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jM0GYMrQZcPymVXdLOLP.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jM0GYMrQZcPymVXdLOLP.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jM0GYMrQZcPymVXdLOLP.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jM0GYMrQZcPymVXdLOLP.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jM0GYMrQZcPymVXdLOLP.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jM0GYMrQZcPymVXdLOLP.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jM0GYMrQZcPymVXdLOLP.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jM0GYMrQZcPymVXdLOLP.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jM0GYMrQZcPymVXdLOLP.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jM0GYMrQZcPymVXdLOLP.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jM0GYMrQZcPymVXdLOLP.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jM0GYMrQZcPymVXdLOLP.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jM0GYMrQZcPymVXdLOLP.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jM0GYMrQZcPymVXdLOLP.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jM0GYMrQZcPymVXdLOLP.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jM0GYMrQZcPymVXdLOLP.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
  &lt;figcaption&gt;
    Section for field data
  &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure&gt;
&lt;img alt=&quot;Diagnose performance issues&quot; decoding=&quot;async&quot; height=&quot;355&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/wQ9RGcJAcBBc4SUDK7Dz.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/wQ9RGcJAcBBc4SUDK7Dz.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/wQ9RGcJAcBBc4SUDK7Dz.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/wQ9RGcJAcBBc4SUDK7Dz.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/wQ9RGcJAcBBc4SUDK7Dz.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/wQ9RGcJAcBBc4SUDK7Dz.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/wQ9RGcJAcBBc4SUDK7Dz.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/wQ9RGcJAcBBc4SUDK7Dz.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/wQ9RGcJAcBBc4SUDK7Dz.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/wQ9RGcJAcBBc4SUDK7Dz.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/wQ9RGcJAcBBc4SUDK7Dz.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/wQ9RGcJAcBBc4SUDK7Dz.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/wQ9RGcJAcBBc4SUDK7Dz.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/wQ9RGcJAcBBc4SUDK7Dz.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/wQ9RGcJAcBBc4SUDK7Dz.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/wQ9RGcJAcBBc4SUDK7Dz.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/wQ9RGcJAcBBc4SUDK7Dz.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/wQ9RGcJAcBBc4SUDK7Dz.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
  &lt;figcaption&gt;
    Section for lab data
  &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h3 id=&quot;core-web-vitals-assessment&quot;&gt;Core Web Vitals assessment &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/whats-new-pagespeed-insights/#core-web-vitals-assessment&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The Core Web Vitals assessment result, which earlier appeared as a single word
&amp;quot;passed&amp;quot; or &amp;quot;failed&amp;quot; in Field Data, now stands out as a separate subsection with
a distinct icon.&lt;/p&gt;
&lt;p&gt;Note that there is no change in the assessment process for Core Web Vitals. The
Core Web Vitals metrics FID, LCP, and CLS, may be aggregated at either the page
or origin level. For aggregations with sufficient data in all three metrics, the
aggregation passes the Core Web Vitals assessment if the 75th percentiles of all
three metrics are Good. Otherwise, the aggregation does not pass the assessment.
If the aggregation has insufficient FID data, it will pass the assessment if
both the 75th percentiles of LCP and CLS are Good. If either LCP or CLS has
insufficient data, the page or origin-level aggregation cannot be assessed.&lt;/p&gt;
&lt;h3 id=&quot;labels-for-mobile-and-desktop-performance&quot;&gt;Labels for mobile and desktop performance &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/whats-new-pagespeed-insights/#labels-for-mobile-and-desktop-performance&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;We changed the navigation menu at the top and included links for mobile and
desktop centrally on the report page. The links are now easily visible and
distinctly indicate the platform for which the data is being shown. Doing this
also helped make the navigation bar cleaner.&lt;/p&gt;
&lt;figure&gt;
  &lt;img alt=&quot;Older (at the time of writing) version of PageSpeed Insights&quot; decoding=&quot;async&quot; height=&quot;97&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/hEv5XuTeVV98Z3AS59bQ.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/hEv5XuTeVV98Z3AS59bQ.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/hEv5XuTeVV98Z3AS59bQ.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/hEv5XuTeVV98Z3AS59bQ.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/hEv5XuTeVV98Z3AS59bQ.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/hEv5XuTeVV98Z3AS59bQ.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/hEv5XuTeVV98Z3AS59bQ.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/hEv5XuTeVV98Z3AS59bQ.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/hEv5XuTeVV98Z3AS59bQ.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/hEv5XuTeVV98Z3AS59bQ.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/hEv5XuTeVV98Z3AS59bQ.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/hEv5XuTeVV98Z3AS59bQ.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/hEv5XuTeVV98Z3AS59bQ.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/hEv5XuTeVV98Z3AS59bQ.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/hEv5XuTeVV98Z3AS59bQ.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/hEv5XuTeVV98Z3AS59bQ.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/hEv5XuTeVV98Z3AS59bQ.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/hEv5XuTeVV98Z3AS59bQ.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
  &lt;figcaption&gt;
    PSI mobile and desktop labels before
  &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure&gt;
  &lt;img alt=&quot;Newer version of the navigation bar&quot; decoding=&quot;async&quot; height=&quot;149&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/vi5j7ouZtmWwqN9BRsUD.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/vi5j7ouZtmWwqN9BRsUD.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/vi5j7ouZtmWwqN9BRsUD.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/vi5j7ouZtmWwqN9BRsUD.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/vi5j7ouZtmWwqN9BRsUD.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/vi5j7ouZtmWwqN9BRsUD.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/vi5j7ouZtmWwqN9BRsUD.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/vi5j7ouZtmWwqN9BRsUD.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/vi5j7ouZtmWwqN9BRsUD.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/vi5j7ouZtmWwqN9BRsUD.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/vi5j7ouZtmWwqN9BRsUD.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/vi5j7ouZtmWwqN9BRsUD.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/vi5j7ouZtmWwqN9BRsUD.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/vi5j7ouZtmWwqN9BRsUD.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/vi5j7ouZtmWwqN9BRsUD.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/vi5j7ouZtmWwqN9BRsUD.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/vi5j7ouZtmWwqN9BRsUD.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/vi5j7ouZtmWwqN9BRsUD.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
  &lt;figcaption&gt;
        PSI mobile and desktop labels after
  &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h3 id=&quot;origin-summary&quot;&gt;Origin Summary &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/whats-new-pagespeed-insights/#origin-summary&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The Origin Summary, which provides the aggregated CrUX score for all pages from
the origin, currently appears on click of a checkbox. We have moved this report
section to a new tab, &amp;quot;Origin&amp;quot;, under the Field Data section.&lt;/p&gt;
&lt;img alt=&quot;Origin summary for the new PageSpeed Insights refresh.&quot; decoding=&quot;async&quot; height=&quot;381&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/5Kn5meWq0sWwCLT69lMb.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/5Kn5meWq0sWwCLT69lMb.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/5Kn5meWq0sWwCLT69lMb.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/5Kn5meWq0sWwCLT69lMb.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/5Kn5meWq0sWwCLT69lMb.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/5Kn5meWq0sWwCLT69lMb.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/5Kn5meWq0sWwCLT69lMb.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/5Kn5meWq0sWwCLT69lMb.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/5Kn5meWq0sWwCLT69lMb.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/5Kn5meWq0sWwCLT69lMb.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/5Kn5meWq0sWwCLT69lMb.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/5Kn5meWq0sWwCLT69lMb.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/5Kn5meWq0sWwCLT69lMb.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/5Kn5meWq0sWwCLT69lMb.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/5Kn5meWq0sWwCLT69lMb.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/5Kn5meWq0sWwCLT69lMb.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/5Kn5meWq0sWwCLT69lMb.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/5Kn5meWq0sWwCLT69lMb.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;h3 id=&quot;additional-helpful-information&quot;&gt;Additional helpful information &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/whats-new-pagespeed-insights/#additional-helpful-information&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The report now includes a new information section at the bottom of each field
and lab card sharing the following details about the sampled data:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Data collection period&lt;/li&gt;
&lt;li&gt;Visit durations&lt;/li&gt;
&lt;li&gt;Devices&lt;/li&gt;
&lt;li&gt;Network connections&lt;/li&gt;
&lt;li&gt;Sample size&lt;/li&gt;
&lt;li&gt;Chrome versions&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This information should enhance the distinction between lab and field data and
help users who have previously been uncertain how the two data sources (lab and
field) might differ.&lt;/p&gt;
&lt;img alt=&quot;Enhanced section of information sharing data about field and lab sampling and configuration data&quot; decoding=&quot;async&quot; height=&quot;368&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jVxqisC0x6I5viUGgjAD.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jVxqisC0x6I5viUGgjAD.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jVxqisC0x6I5viUGgjAD.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jVxqisC0x6I5viUGgjAD.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jVxqisC0x6I5viUGgjAD.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jVxqisC0x6I5viUGgjAD.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jVxqisC0x6I5viUGgjAD.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jVxqisC0x6I5viUGgjAD.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jVxqisC0x6I5viUGgjAD.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jVxqisC0x6I5viUGgjAD.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jVxqisC0x6I5viUGgjAD.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jVxqisC0x6I5viUGgjAD.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jVxqisC0x6I5viUGgjAD.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jVxqisC0x6I5viUGgjAD.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jVxqisC0x6I5viUGgjAD.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jVxqisC0x6I5viUGgjAD.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jVxqisC0x6I5viUGgjAD.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/jVxqisC0x6I5viUGgjAD.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;h3 id=&quot;expand-view&quot;&gt;Expand view &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/whats-new-pagespeed-insights/#expand-view&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;We have a new &amp;quot;Expand view&amp;quot; feature that adds a drill-down function to the field
data section and allows you to view granular details for the Core Web Vitals
metrics.&lt;/p&gt;
&lt;img alt=&quot;Newly expanded view with a drill-down for field data metrics.&quot; decoding=&quot;async&quot; height=&quot;515&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/UFVgoK1gJBYk5DLhFwIn.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/UFVgoK1gJBYk5DLhFwIn.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/UFVgoK1gJBYk5DLhFwIn.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/UFVgoK1gJBYk5DLhFwIn.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/UFVgoK1gJBYk5DLhFwIn.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/UFVgoK1gJBYk5DLhFwIn.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/UFVgoK1gJBYk5DLhFwIn.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/UFVgoK1gJBYk5DLhFwIn.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/UFVgoK1gJBYk5DLhFwIn.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/UFVgoK1gJBYk5DLhFwIn.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/UFVgoK1gJBYk5DLhFwIn.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/UFVgoK1gJBYk5DLhFwIn.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/UFVgoK1gJBYk5DLhFwIn.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/UFVgoK1gJBYk5DLhFwIn.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/UFVgoK1gJBYk5DLhFwIn.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/UFVgoK1gJBYk5DLhFwIn.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/UFVgoK1gJBYk5DLhFwIn.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/UFVgoK1gJBYk5DLhFwIn.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;h3 id=&quot;page-image&quot;&gt;Page image &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/whats-new-pagespeed-insights/#page-image&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;We have removed the image of the loaded page, which appears right next to the
field data. The image and thumbnails of the page displaying the loading sequence
will both be available in the lab data section.&lt;/p&gt;
&lt;img alt=&quot;Loaded page image next to the lab data.&quot; decoding=&quot;async&quot; height=&quot;444&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/dnIsJA35tj7vs6qgybRM.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/dnIsJA35tj7vs6qgybRM.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/dnIsJA35tj7vs6qgybRM.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/dnIsJA35tj7vs6qgybRM.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/dnIsJA35tj7vs6qgybRM.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/dnIsJA35tj7vs6qgybRM.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/dnIsJA35tj7vs6qgybRM.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/dnIsJA35tj7vs6qgybRM.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/dnIsJA35tj7vs6qgybRM.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/dnIsJA35tj7vs6qgybRM.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/dnIsJA35tj7vs6qgybRM.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/dnIsJA35tj7vs6qgybRM.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/dnIsJA35tj7vs6qgybRM.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/dnIsJA35tj7vs6qgybRM.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/dnIsJA35tj7vs6qgybRM.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/dnIsJA35tj7vs6qgybRM.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/dnIsJA35tj7vs6qgybRM.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/dnIsJA35tj7vs6qgybRM.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;p&gt;For up to date product documentation, visit
&lt;a href=&quot;https://developers.google.com/speed/docs/insights/v5/about&quot; rel=&quot;noopener&quot;&gt;https://developers.google.com/speed/docs/insights/.&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;updates-to-webdevmeasure&quot;&gt;Updates to web.dev/measure &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/whats-new-pagespeed-insights/#updates-to-webdevmeasure&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To reduce inconsistency between the different tools in our performance toolbox,
we are also updating &lt;a href=&quot;https://web.dev/measure/&quot;&gt;web.dev/measure&lt;/a&gt; to be directly powered by the &lt;a href=&quot;https://developers.google.com/speed/docs/insights/v5/get-started&quot; rel=&quot;noopener&quot;&gt;PageSpeed Insights API&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Previously, developers would run reports via both the PSI tool and /measure
and see different Lighthouse numbers. One of the main reasons for differences
was because /measure originated all tests from the U.S. (due to it previously
having a cloud backend that was US-based).&lt;/p&gt;
&lt;p&gt;With /measure calling the same API directly as the PSI UI, developers will get
a more consistent experience when using PSI and /measure. We have also made
a few tweaks to /measure based on how users use the tool. This means that the
signed-in experience for /measure will be going away, but the most used
functionality—seeing multiple categories—will still be available for use.&lt;/p&gt;
&lt;figure&gt;
  &lt;img alt=&quot;The old version of the measure page.&quot; decoding=&quot;async&quot; height=&quot;377&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/KFZmLMU2iSxkPDph7FTV.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/KFZmLMU2iSxkPDph7FTV.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/KFZmLMU2iSxkPDph7FTV.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/KFZmLMU2iSxkPDph7FTV.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/KFZmLMU2iSxkPDph7FTV.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/KFZmLMU2iSxkPDph7FTV.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/KFZmLMU2iSxkPDph7FTV.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/KFZmLMU2iSxkPDph7FTV.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/KFZmLMU2iSxkPDph7FTV.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/KFZmLMU2iSxkPDph7FTV.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/KFZmLMU2iSxkPDph7FTV.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/KFZmLMU2iSxkPDph7FTV.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/KFZmLMU2iSxkPDph7FTV.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/KFZmLMU2iSxkPDph7FTV.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/KFZmLMU2iSxkPDph7FTV.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/KFZmLMU2iSxkPDph7FTV.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/KFZmLMU2iSxkPDph7FTV.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/KFZmLMU2iSxkPDph7FTV.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
  &lt;figcaption&gt;
    web.dev/measure before
  &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure&gt;
  &lt;img alt=&quot;The refreshed version of the measure tool focusing on offering page quality measurement.&quot; decoding=&quot;async&quot; height=&quot;696&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/C04zQEkxtSQqPEQedNN7.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/C04zQEkxtSQqPEQedNN7.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/C04zQEkxtSQqPEQedNN7.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/C04zQEkxtSQqPEQedNN7.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/C04zQEkxtSQqPEQedNN7.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/C04zQEkxtSQqPEQedNN7.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/C04zQEkxtSQqPEQedNN7.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/C04zQEkxtSQqPEQedNN7.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/C04zQEkxtSQqPEQedNN7.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/C04zQEkxtSQqPEQedNN7.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/C04zQEkxtSQqPEQedNN7.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/C04zQEkxtSQqPEQedNN7.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/C04zQEkxtSQqPEQedNN7.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/C04zQEkxtSQqPEQedNN7.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/C04zQEkxtSQqPEQedNN7.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/C04zQEkxtSQqPEQedNN7.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/C04zQEkxtSQqPEQedNN7.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/C04zQEkxtSQqPEQedNN7.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
  &lt;figcaption&gt;
    web.dev/measure after
  &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id=&quot;psi-today&quot;&gt;PSI today &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/whats-new-pagespeed-insights/#psi-today&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Taking a step back, let&#39;s look at what the current PageSpeed Insights report
offers. The PSI report includes performance data for both mobile and desktop
devices in individual tabs and suggests how you may improve a page. The key
components of the report in each case are similar and consist of the
following:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Performance Score:&lt;/strong&gt; The performance score appears at the top of the PSI
report and summarizes the overall page performance. This score is determined by
running &lt;a href=&quot;https://developer.chrome.com/docs/lighthouse/overview/&quot; rel=&quot;noopener&quot;&gt;Lighthouse&lt;/a&gt; to
collect and analyze &lt;a href=&quot;https://developers.google.com/speed/docs/insights/v5/about#lab&quot; rel=&quot;noopener&quot;&gt;lab
data&lt;/a&gt; about the
page. A score of 90 or above is considered good, 50-90 needs improvement, and
below 50 is poor.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Field Data:&lt;/strong&gt; Field data, sourced from the
&lt;a href=&quot;https://developer.chrome.com/docs/crux/&quot; rel=&quot;noopener&quot;&gt;CrUX report&lt;/a&gt;
dataset, provides insights into the real-world user experience. The data
includes metrics such as &lt;a href=&quot;https://web.dev/fcp/&quot;&gt;First Contentful Paint&lt;/a&gt; (FCP),
and measures Core Web Vitals  (&lt;a href=&quot;https://web.dev/fid/&quot;&gt;First Input Delay&lt;/a&gt; (FID),
&lt;a href=&quot;https://web.dev/lcp/&quot;&gt;Largest Contentful Paint&lt;/a&gt; (LCP), and &lt;a href=&quot;https://web.dev/cls/&quot;&gt;Cumulative Layout
Shift&lt;/a&gt; (CLS). Along with the metric values, you can also
see the distribution of pages where the value of a particular metric was Good,
Needs Improvement, or Poor, indicated by green, amber, and red bars,
respectively. The distribution and scores are shown based on page loads for
users in the CrUX dataset. Scores are calculated for the last 28 days and are
not available for new pages where sufficient real-user data may not be
available.&lt;/p&gt;
&lt;img alt=&quot;breakdown of different sections of data in the current PageSpeed Insight report&quot; decoding=&quot;async&quot; height=&quot;497&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/A7xrSBFuqf9puSgBJH4l.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/A7xrSBFuqf9puSgBJH4l.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/A7xrSBFuqf9puSgBJH4l.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/A7xrSBFuqf9puSgBJH4l.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/A7xrSBFuqf9puSgBJH4l.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/A7xrSBFuqf9puSgBJH4l.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/A7xrSBFuqf9puSgBJH4l.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/A7xrSBFuqf9puSgBJH4l.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/A7xrSBFuqf9puSgBJH4l.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/A7xrSBFuqf9puSgBJH4l.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/A7xrSBFuqf9puSgBJH4l.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/A7xrSBFuqf9puSgBJH4l.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/A7xrSBFuqf9puSgBJH4l.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/A7xrSBFuqf9puSgBJH4l.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/A7xrSBFuqf9puSgBJH4l.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/A7xrSBFuqf9puSgBJH4l.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/A7xrSBFuqf9puSgBJH4l.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/A7xrSBFuqf9puSgBJH4l.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;p&gt;&lt;strong&gt;Origin Summary:&lt;/strong&gt; Users can click on the &lt;em&gt;Show Origin Summary&lt;/em&gt; checkbox to
view the aggregated score for the metrics for all pages served from the same
origin over the last 28 days.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Lab Data:&lt;/strong&gt; Lab performance score, calculated using Lighthouse, helps debug
performance issues, as it is collected in a controlled environment. The report
shows the performance using metrics like&lt;a href=&quot;https://web.dev/fcp/&quot;&gt;First Contentful
Paint&lt;/a&gt;, &lt;a href=&quot;https://web.dev/lcp/&quot;&gt;Largest Contentful Paint&lt;/a&gt;,
&lt;a href=&quot;https://developer.chrome.com/docs/lighthouse/performance/speed-index/&quot; rel=&quot;noopener&quot;&gt;Speed Index&lt;/a&gt;, &lt;a href=&quot;https://web.dev/cls/&quot;&gt;Cumulative Layout
Shift&lt;/a&gt;, &lt;a href=&quot;https://web.dev/tti/&quot;&gt;Time to
Interactive&lt;/a&gt;, and &lt;a href=&quot;https://web.dev/tbt/&quot;&gt;Total Blocking
Time&lt;/a&gt;. Each metric is
&lt;a href=&quot;https://developer.chrome.com/docs/lighthouse/performance/performance-scoring/&quot; rel=&quot;noopener&quot;&gt;scored&lt;/a&gt; and labeled with an icon
indicating Good, Needs improvement, or Poor. This section provides a good
indication of performance bottlenecks pre-release and can help to diagnose
problems, but may not capture real-world issues.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Audits:&lt;/strong&gt; This section lists all the audits run by Lighthouse and lists down
the passed audits along with opportunities for improvement and additional
diagnostic information.&lt;/p&gt;
&lt;h3 id=&quot;challenges-with-the-current-psi-design&quot;&gt;Challenges with the current PSI design &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/whats-new-pagespeed-insights/#challenges-with-the-current-psi-design&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;As seen in the screenshot above, the different data points from lab and field
data are not isolated clearly, and developers who are new to PSI may not easily
understand the context of the data and what to do next. This confusion has
resulted in many &amp;quot;How to&amp;quot; blog posts on deciphering the PSI report.&lt;/p&gt;
&lt;p&gt;With the redesign, we hope to make interpreting the report easier for developers
so that they move quickly from generating the PSI report to acting upon the
insights included in it.&lt;/p&gt;
&lt;h2 id=&quot;learn-more&quot;&gt;Learn more &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/whats-new-pagespeed-insights/#learn-more&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;For more details on performance tooling updates, watch the keynote for &lt;a href=&quot;https://developer.chrome.com/devsummit/schedule/keynote/&quot; rel=&quot;noopener&quot;&gt;Chrome
Dev Summit 2021&lt;/a&gt;.
We will keep you posted on the release date for PSI and the changes to web.dev/measure.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;With thanks to Milica Mihajlija, Philip Walton, Brendan Kenny and
Ewa Gasperowicz for their feedback on this article&lt;/em&gt;&lt;/p&gt;
</content>
    <author>
      <name>Leena Sohoni</name>
    </author><author>
      <name>Addy Osmani</name>
    </author><author>
      <name>Elizabeth Sweeny</name>
    </author>
  </entry>
  
  <entry>
    <title>Optimizing resource loading with the Fetch Priority API</title>
    <link href="https://web.dev/fetch-priority/"/>
    <updated>2021-10-20T00:00:00Z</updated>
    <id>https://web.dev/fetch-priority/</id>
    <content type="html" mode="escaped">&lt;div class=&quot;wdi-browser-compat&quot;&gt;
  &lt;span class=&quot;wdi-browser-compat__label&quot;&gt;Browser support&lt;/span&gt;
  &lt;ul class=&quot;wdi-browser-compat__items&quot;&gt;
    &lt;li class=&quot;wdi-browser-compat__item&quot;&gt;
    &lt;span class=&quot;wdi-browser-compat__icon&quot; data-browser=&quot;chrome&quot;&gt;
      &lt;span class=&quot;visually-hidden&quot;&gt;Chrome 102, Supported&lt;/span&gt;
    &lt;/span&gt;
    &lt;span class=&quot;wdi-browser-compat__version&quot; data-compat=&quot;yes&quot; title=&quot;Supported&quot; aria-label=&quot;Supported&quot;&gt;
      102
    &lt;/span&gt;
    &lt;/li&gt;&lt;li class=&quot;wdi-browser-compat__item&quot;&gt;
    &lt;span class=&quot;wdi-browser-compat__icon&quot; data-browser=&quot;firefox&quot;&gt;
      &lt;span class=&quot;visually-hidden&quot;&gt;Firefox, Not supported&lt;/span&gt;
    &lt;/span&gt;
    &lt;span class=&quot;wdi-browser-compat__version&quot; data-compat=&quot;no&quot; title=&quot;Not supported&quot; aria-label=&quot;Not supported&quot;&gt;
&lt;p&gt;&lt;/p&gt;&lt;/span&gt;
&lt;/li&gt;&lt;li class=&quot;wdi-browser-compat__item&quot;&gt;
&lt;span class=&quot;wdi-browser-compat__icon&quot; data-browser=&quot;edge&quot;&gt;
&lt;span class=&quot;visually-hidden&quot;&gt;Edge 102, Supported&lt;/span&gt;
&lt;/span&gt;
&lt;span class=&quot;wdi-browser-compat__version&quot; data-compat=&quot;yes&quot; title=&quot;Supported&quot; aria-label=&quot;Supported&quot;&gt;
102
&lt;/span&gt;
&lt;/li&gt;&lt;li class=&quot;wdi-browser-compat__item&quot;&gt;
&lt;span class=&quot;wdi-browser-compat__icon&quot; data-browser=&quot;safari&quot;&gt;
&lt;span class=&quot;visually-hidden&quot;&gt;Safari preview, Preview&lt;/span&gt;
&lt;/span&gt;
&lt;span class=&quot;wdi-browser-compat__version&quot; data-compat=&quot;preview&quot; title=&quot;Preview&quot; aria-label=&quot;Preview&quot;&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;/span&gt;
&lt;/li&gt;&lt;p&gt;&lt;/p&gt;
  &lt;/ul&gt;
  &lt;a class=&quot;wdi-browser-compat__link&quot; href=&quot;https://developer.mozilla.org/docs/Web/API/HTMLImageElement/fetchPriority#browser_compatibility&quot; target=&quot;_blank&quot;&gt;Source&lt;/a&gt;
&lt;/div&gt;
&lt;aside class=&quot;aside flow bg-state-info-bg color-state-info-text&quot;&gt;&lt;div class=&quot; flow&quot;&gt; This feature was originally called Priority Hints but was renamed to Fetch Priority after standardization. See &lt;a href=&quot;https://web.dev/fetch-priority/#history&quot;&gt;History&lt;/a&gt; below for more details. &lt;/div&gt;&lt;/aside&gt;
&lt;p&gt;When a browser parses a web page and begins to discover and download resources such as images, scripts, or CSS, it assigns them a fetch &lt;code&gt;priority&lt;/code&gt; in an attempt to download resources in an optimal order. These priorities can depend on the kind of resource and where it is in the document. For example, in-viewport images may have a &lt;code&gt;High&lt;/code&gt; priority while the priority for early loaded, render-blocking CSS via &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt;s in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; could be &lt;code&gt;Very High&lt;/code&gt;. Browsers are pretty good at assigning priorities that work well but may not be optimal in all cases.&lt;/p&gt;
&lt;p&gt;In this article, we&#39;ll discuss the Fetch Priority API and the &lt;code&gt;fetchpriority&lt;/code&gt; HTML attribute, which allow you to hint at the relative priority of a resource (&lt;code&gt;high&lt;/code&gt; or &lt;code&gt;low&lt;/code&gt;). Fetch Priority can help optimize the Core Web Vitals.&lt;/p&gt;
&lt;figure&gt;
  &lt;img alt=&quot;A filmstrip view comparing two tests of the Google Flights homepage. At bottom, Fetch Priority are used to boost the priority of the hero image, resulting in a 0.7 second decrease in LCP.&quot; decoding=&quot;async&quot; height=&quot;400&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/UQ60oFwWrVCPbFYx3pJY.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/UQ60oFwWrVCPbFYx3pJY.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/UQ60oFwWrVCPbFYx3pJY.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/UQ60oFwWrVCPbFYx3pJY.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/UQ60oFwWrVCPbFYx3pJY.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/UQ60oFwWrVCPbFYx3pJY.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/UQ60oFwWrVCPbFYx3pJY.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/UQ60oFwWrVCPbFYx3pJY.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/UQ60oFwWrVCPbFYx3pJY.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/UQ60oFwWrVCPbFYx3pJY.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/UQ60oFwWrVCPbFYx3pJY.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/UQ60oFwWrVCPbFYx3pJY.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/UQ60oFwWrVCPbFYx3pJY.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/UQ60oFwWrVCPbFYx3pJY.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/UQ60oFwWrVCPbFYx3pJY.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/UQ60oFwWrVCPbFYx3pJY.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/UQ60oFwWrVCPbFYx3pJY.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/UQ60oFwWrVCPbFYx3pJY.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
  &lt;figcaption&gt;Fetch Priority improving Largest Contentful Paint from 2.6&amp;nbsp;s to 1.9&amp;nbsp;s in a test of Google Flights&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id=&quot;summary&quot;&gt;Summary &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/fetch-priority/#summary&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;A few key areas where Fetch Priority can help:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Boost the priority of the LCP image by specifying &lt;code&gt;fetchpriority=&amp;quot;high&amp;quot;&lt;/code&gt; on the image element, causing LCP to happen sooner.&lt;/li&gt;
&lt;li&gt;Increase the priority of &lt;code&gt;async&lt;/code&gt; scripts using better semantics than the current hack that is commonly used (inserting a &lt;code&gt;&amp;lt;link rel=&amp;quot;preload&amp;quot;&amp;gt;&lt;/code&gt; for the &lt;code&gt;async&lt;/code&gt; script).&lt;/li&gt;
&lt;li&gt;Decrease the priority of late-body scripts to allow for better sequencing with images.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Historically, developers have had some, but limited, influence over resource priority using &lt;a href=&quot;https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preload/&quot; rel=&quot;noopener&quot;&gt;preload&lt;/a&gt; and &lt;a href=&quot;https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preconnect/&quot; rel=&quot;noopener&quot;&gt;preconnect&lt;/a&gt;. Fetch Priority complements these &lt;a href=&quot;https://www.w3.org/TR/resource-hints/&quot; rel=&quot;noopener&quot;&gt;Resource Hints&lt;/a&gt;, but it&#39;s essential to understand where they all fit in. Preload lets you tell the browser about critical resources you want to load early before they are discovered naturally. This is especially useful for resources that are not easily discovered, such as fonts included in stylesheets, background images, or resources loaded from a script. Preconnect helps warm up connections to cross-origin servers and can help improve metrics like &lt;a href=&quot;https://web.dev/ttfb/&quot;&gt;Time-to-first-byte&lt;/a&gt; and is useful when you know an origin but not necessarily the exact URL of a resource that will be needed.&lt;/p&gt;
&lt;p&gt;Fetch Priority is a markup-based signal (available through the &lt;code&gt;fetchpriority&lt;/code&gt; attribute) that developers can use to indicate the relative priority of a particular resource. You can also use these hints via JavaScript and the &lt;a href=&quot;https://web.dev/introduction-to-fetch/&quot;&gt;Fetch API&lt;/a&gt; with the &lt;code&gt;priority&lt;/code&gt; property to influence the priority of resource fetches made for data. Fetch Priority can also complement preload. Take a Largest Contentful Paint image, which, when preloaded, will still get a low priority. If it is pushed back by other early low-priority resources, using Fetch Priority can help how soon the image gets loaded.&lt;/p&gt;
&lt;p&gt;Fetch Priority is &lt;a href=&quot;https://www.chromestatus.com/feature/5273474901737472&quot; rel=&quot;noopener&quot;&gt;available&lt;/a&gt; in Chrome 101 or later.&lt;/p&gt;
&lt;h2 id=&quot;resource-priority&quot;&gt;Resource priority &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/fetch-priority/#resource-priority&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The resource download sequence depends on the browser&#39;s assigned priority for every resource on the page. Different factors can affect priority computation logic. For example,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CSS, fonts, scripts, images, and third-party resources are assigned different priorities.&lt;/li&gt;
&lt;li&gt;The location or order in which you reference resources in the document also affects the priority of resources.&lt;/li&gt;
&lt;li&gt;The &lt;a href=&quot;https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preload/&quot; rel=&quot;noopener&quot;&gt;&lt;code&gt;preload&lt;/code&gt;&lt;/a&gt; resource hint helps the browser to discover a resource faster and thus load it before the document loads it and affects priority.&lt;/li&gt;
&lt;li&gt;Priority computation changes for &lt;a href=&quot;https://web.dev/efficiently-load-third-party-javascript/#use-async-or-defer&quot;&gt;&lt;code&gt;async&lt;/code&gt; or &lt;code&gt;defer&lt;/code&gt;&lt;/a&gt; scripts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following table considers such factors to show how most resources are currently prioritized and sequenced in Chrome.&lt;/p&gt;
&lt;div class=&quot;table-wrapper&quot;&gt;
  &lt;table&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th&gt;&amp;nbsp;&lt;/th&gt;
        &lt;th&gt;Layout-blocking&lt;/th&gt;
        &lt;th&gt;Load in layout-blocking phase&lt;/th&gt;
        &lt;th colspan=&quot;3&quot;&gt;Load one-at-a-time in layout-blocking phase&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Blink&lt;br /&gt;Priority&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;VeryHigh&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;High&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;Medium&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;Low&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;VeryLow&lt;/strong&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;DevTools&lt;br /&gt;Priority&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;Highest&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;High&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;Medium&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;Low&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;Lowest&lt;/strong&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;Main resource&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;CSS*** (early**)&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;CSS*** (late**)&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;CSS (mismatch)&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;Script (early** or not from preload scanner)&lt;/td&gt;
        &lt;td&gt;Script (**late)&lt;/td&gt;
        &lt;td&gt;Script (async)&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;Font&lt;/td&gt;
        &lt;td&gt;Font (preload)&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;Import&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;Image (in viewport)&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;Image&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;Media&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;SVG document&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;Prefetch&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;Preload*&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;XSL&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;XHR (sync)&lt;/td&gt;
        &lt;td&gt;XHR/fetch* (async)&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;aside class=&quot;aside flow bg-state-info-bg color-state-info-text&quot;&gt;&lt;div class=&quot; flow&quot;&gt; * Preload using &lt;code&gt;&amp;quot;as&amp;quot;&lt;/code&gt; or fetch using &lt;code&gt;&amp;quot;type&amp;quot;&lt;/code&gt; use the priority of the type they are requesting (e.g., preload &lt;code&gt;as=&amp;quot;stylesheet&amp;quot;&lt;/code&gt; will use Highest priority). With no &lt;code&gt;&amp;quot;as&amp;quot;&lt;/code&gt;, they will behave like an XHR.&lt;br /&gt; ** &amp;quot;Early&amp;quot; is defined as being requested before any non-preloaded images have been requested (&amp;quot;late&amp;quot; is after).&lt;br /&gt; *** CSS where the media type doesn&#39;t match is not fetched by the preload scanner and is only processed when the main parser reaches it, which usually means it will be fetched very late and with a &amp;quot;late&amp;quot; priority. &lt;/div&gt;&lt;/aside&gt;
&lt;p&gt;The browser downloads resources with the same computed priority in the order they are discovered. You can check the priority assigned to different resources when loading a page under the Chrome Dev Tools &lt;strong&gt;Network&lt;/strong&gt; tab. (Ensure that you include the priority column by right-clicking on the table headings).&lt;/p&gt;
&lt;figure&gt;
  &lt;img alt=&quot;A screenshot of assets listed in the network tab of Chrome&amp;#x27;s DevTools. The columns read, from left to right: name, status, type, initiator, size, time, and priority.&quot; decoding=&quot;async&quot; height=&quot;263&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Lwm9jwJF5sQ3gQ7PHSs1.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Lwm9jwJF5sQ3gQ7PHSs1.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Lwm9jwJF5sQ3gQ7PHSs1.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Lwm9jwJF5sQ3gQ7PHSs1.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Lwm9jwJF5sQ3gQ7PHSs1.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Lwm9jwJF5sQ3gQ7PHSs1.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Lwm9jwJF5sQ3gQ7PHSs1.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Lwm9jwJF5sQ3gQ7PHSs1.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Lwm9jwJF5sQ3gQ7PHSs1.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Lwm9jwJF5sQ3gQ7PHSs1.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Lwm9jwJF5sQ3gQ7PHSs1.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Lwm9jwJF5sQ3gQ7PHSs1.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Lwm9jwJF5sQ3gQ7PHSs1.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Lwm9jwJF5sQ3gQ7PHSs1.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Lwm9jwJF5sQ3gQ7PHSs1.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Lwm9jwJF5sQ3gQ7PHSs1.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Lwm9jwJF5sQ3gQ7PHSs1.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Lwm9jwJF5sQ3gQ7PHSs1.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
  &lt;figcaption&gt;Priority for resource &lt;code&gt;type = &amp;quot;font&amp;quot;&lt;/code&gt; on BBC news detail page&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure&gt;
  &lt;img alt=&quot;A screenshot of assets listed in the network tab of Chrome&amp;#x27;s DevTools. The columns read, from left to right: name, status, type, initiator, size, time, and priority.&quot; decoding=&quot;async&quot; height=&quot;175&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/K5U3maOt2TFBbtScW7TY.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/K5U3maOt2TFBbtScW7TY.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/K5U3maOt2TFBbtScW7TY.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/K5U3maOt2TFBbtScW7TY.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/K5U3maOt2TFBbtScW7TY.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/K5U3maOt2TFBbtScW7TY.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/K5U3maOt2TFBbtScW7TY.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/K5U3maOt2TFBbtScW7TY.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/K5U3maOt2TFBbtScW7TY.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/K5U3maOt2TFBbtScW7TY.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/K5U3maOt2TFBbtScW7TY.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/K5U3maOt2TFBbtScW7TY.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/K5U3maOt2TFBbtScW7TY.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/K5U3maOt2TFBbtScW7TY.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/K5U3maOt2TFBbtScW7TY.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/K5U3maOt2TFBbtScW7TY.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/K5U3maOt2TFBbtScW7TY.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/K5U3maOt2TFBbtScW7TY.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
  &lt;figcaption&gt;Priority for resource type = &amp;quot;script&amp;quot; on BBC news detail page&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id=&quot;when-would-you-need-fetch-priority&quot;&gt;When would you need Fetch Priority? &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/fetch-priority/#when-would-you-need-fetch-priority&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Knowledge of the browser&#39;s prioritization logic provides you with a few existing knobs to tweak the order of downloads. You can&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Place resource tags such as &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; depending on the order you want to download them. Resources with the same priority are generally loaded in the order they are discovered.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://web.dev/preload-critical-assets/&quot;&gt;Use the &lt;code&gt;preload&lt;/code&gt; resource hint&lt;/a&gt; to download necessary resources earlier, particularly for resources that are not easily discovered early by the browser.&lt;/li&gt;
&lt;li&gt;Use &lt;a href=&quot;https://web.dev/efficiently-load-third-party-javascript/#use-async-or-defer&quot;&gt;&lt;code&gt;async&lt;/code&gt; or &lt;code&gt;defer&lt;/code&gt;&lt;/a&gt; to download scripts without blocking other resources.&lt;/li&gt;
&lt;li&gt;Lazy-load below-the-fold content so that the browser can use the available bandwidth for more critical above-the-fold resources.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;These techniques help to control the browser&#39;s priority computation, thereby improving performance and &lt;a href=&quot;https://web.dev/vitals/&quot;&gt;Core Web Vitals&lt;/a&gt;. For example, when a critical background image is preloaded, it can be discovered much earlier, improving the Largest Contentful Paint (&lt;a href=&quot;https://web.dev/lcp/&quot;&gt;LCP&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Sometimes these handles may not be enough to prioritize resources optimally for your application. Here are some of the scenarios where Fetch Priority could be helpful:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You have several above-the-fold images, but all of them need not have the same priority. For example, in an image carousel, only the first visible image needs a higher priority compared to the others.&lt;/li&gt;
&lt;li&gt;Hero images inside the viewport start at a &amp;quot;Low&amp;quot; priority. After the layout is complete, Chrome discovers they are in the viewport and boosts their priority (unfortunately, dev tools only shows the final priority—WebPageTest will show both). This usually adds a significant delay to loading the image. Providing the Fetch Priority in markup lets the image start at a &amp;quot;High&amp;quot; priority and start loading much earlier.&lt;br /&gt;&lt;br /&gt;Note that preload is still required for the early discovery of LCP images included as CSS backgrounds and can be combined with Fetch Priority by including the &lt;code&gt;fetchpriority=&#39;high&#39;&lt;/code&gt; on the preload, otherwise it will still start with the default &amp;quot;Low&amp;quot; priority for images.&lt;/li&gt;
&lt;li&gt;Declaring scripts as &lt;code&gt;async&lt;/code&gt; or &lt;code&gt;defer&lt;/code&gt; tells the browser to load them asynchronously. However, as seen in the figure above, these scripts are also assigned a &amp;quot;low&amp;quot; priority. You may want to bump up their priority while ensuring asynchronous download, particularly for any scripts that are critical for the user experience.&lt;/li&gt;
&lt;li&gt;You may use the JavaScript &lt;a href=&quot;https://web.dev/introduction-to-fetch/&quot;&gt;&lt;code&gt;fetch()&lt;/code&gt;&lt;/a&gt; API to fetch resources or data asynchronously. Fetch is assigned a &amp;quot;High&amp;quot; priority by the browser. There may be situations where you do not want all your fetches to be executed with &amp;quot;High&amp;quot; priority and prefer using different Fetch Priority instead. This can be helpful when running background API calls and mixing them with API calls that are responding to user input, like with autocomplete. The background API calls can be tagged as &amp;quot;Low&amp;quot; priority and the interactive API calls marked as &amp;quot;High&amp;quot; priority.&lt;/li&gt;
&lt;li&gt;The browser assigns CSS and fonts a &amp;quot;High&amp;quot; priority, but all such resources may not be equally important or required for LCP. You can use Fetch Priority to lower the priority of some of these resources.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;the-fetchpriority-attribute&quot;&gt;The &lt;code&gt;fetchpriority&lt;/code&gt; attribute &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/fetch-priority/#the-fetchpriority-attribute&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You can provide a Fetch Priority using the &lt;code&gt;fetchpriority&lt;/code&gt; HTML attribute. You can use the attribute with &lt;code&gt;link&lt;/code&gt;, &lt;code&gt;img&lt;/code&gt;, and &lt;code&gt;script&lt;/code&gt; tags. The attribute allows you to specify the priority for resource types such as CSS, fonts, scripts, and images when downloaded using the supported tags.
The &lt;code&gt;fetchpriority&lt;/code&gt; attribute accepts one of three values:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;high&lt;/code&gt;: You consider the resource a high priority and want the browser to prioritize it as long as the browser&#39;s heuristics don&#39;t prevent that from happening.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;low&lt;/code&gt;: You consider the resource a low priority and want the browser to deprioritize it if it&#39;s heuristics permit.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;auto&lt;/code&gt;: This is the default value where you don&#39;t have a preference and let the browser decide the appropriate priority.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here are a few examples of using the &lt;code&gt;fetchpriority&lt;/code&gt; attribute in markup and the script-equivalent &lt;code&gt;priority&lt;/code&gt; property.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;&amp;lt;!-- We don&#39;t want a high priority for this above-the-fold image --&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;img&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;/images/in_viewport_but_not_important.svg&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;fetchpriority&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;low&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;alt&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;I&lt;span class=&quot;token punctuation&quot;&gt;&#39;&lt;/span&gt;m an unimportant image!&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token comment&quot;&gt;&amp;lt;!-- We want to initiate an early fetch for a resource, but also deprioritize it --&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;link&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;rel&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;preload&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;/js/script.js&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;as&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;script&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;fetchpriority&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;low&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;script&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token script&quot;&gt;&lt;span class=&quot;token language-javascript&quot;&gt;&lt;br /&gt;  &lt;span class=&quot;token function&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;https://example.com/&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token literal-property property&quot;&gt;priority&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;low&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token comment&quot;&gt;// Trigger a low priority fetch&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;script&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;h3 id=&quot;browser-priority-and-fetchpriority&quot;&gt;Browser priority and &lt;code&gt;fetchpriority&lt;/code&gt; &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/fetch-priority/#browser-priority-and-fetchpriority&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;You can apply the &lt;code&gt;fetchpriority&lt;/code&gt; attribute to different resources as shown in the following figure to potentially increase or reduce their computed priority. &lt;code&gt;fetchpriority=&amp;quot;auto&amp;quot;&lt;/code&gt; (◉) in each row denotes the default priority for that type of resource.&lt;/p&gt;
&lt;div class=&quot;table-wrapper&quot;&gt;
  &lt;table&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th&gt;&amp;nbsp;&lt;/th&gt;
        &lt;th&gt;Layout-blocking&lt;/th&gt;
        &lt;th&gt;Load in layout-blocking phase&lt;/th&gt;
        &lt;th colspan=&quot;3&quot;&gt;Load one-at-a-time in layout-blocking phase&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Blink&lt;br /&gt;Priority&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;VeryHigh&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;High&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;Medium&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;Low&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;VeryLow&lt;/strong&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;DevTools&lt;br /&gt;Priority&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;Highest&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;High&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;Medium&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;Low&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;Lowest&lt;/strong&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Main Resource&lt;/td&gt;
        &lt;td&gt;◉&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;CSS*** (early**)&lt;/td&gt;
        &lt;td&gt;⬆◉&lt;/td&gt;
        &lt;td&gt;⬇&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;CSS*** (late**)&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;⬆&lt;/td&gt;
        &lt;td&gt;◉&lt;/td&gt;
        &lt;td&gt;⬇&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Script (early** or not from preload scanner)&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;⬆◉&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;⬇&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Script*** (late**)&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;⬆&lt;/td&gt;
        &lt;td&gt;◉&lt;/td&gt;
        &lt;td&gt;⬇&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Script (async/defer)&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;⬆&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;◉⬇&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Font&lt;/td&gt;
        &lt;td&gt;◉&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Font (preload)&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;⬆◉&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;⬇&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Import&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;◉&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Image (in viewport)&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;⬆◉&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;⬇&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Image&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;⬆&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;◉⬇&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Media (video/audio)&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;⬆&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;◉⬇&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;SVG document&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;⬆&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;◉⬇&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;XHR (sync) - deprecated&lt;/td&gt;
        &lt;td&gt;◉&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;XHR/fetch* (async)&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;⬆◉&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;⬇&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Preload*&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;⬆◉&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;⬇&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Prefetch&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;◉&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Favicon&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;◉&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;XSL&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;◉&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;aside class=&quot;aside flow bg-state-info-bg color-state-info-text&quot;&gt;&lt;div class=&quot; flow&quot;&gt; * Preload using &lt;code&gt;&amp;quot;as&amp;quot;&lt;/code&gt; or fetch using &lt;code&gt;&amp;quot;type&amp;quot;&lt;/code&gt; use the priority of the type they are requesting (e.g., preload &lt;code&gt;as=&amp;quot;stylesheet&amp;quot;&lt;/code&gt; will use Highest priority). With no &lt;code&gt;&amp;quot;as&amp;quot;&lt;/code&gt;, they will behave like an XHR.&lt;br /&gt; ** &amp;quot;Early&amp;quot; is defined as being requested before any non-preloaded images have been requested (&amp;quot;late&amp;quot; is after).&lt;br /&gt; *** CSS where the media type doesn&#39;t match is not fetched by the preload scanner and is only processed when the main parser reaches it, which usually means it will be fetched very late and with a &amp;quot;late&amp;quot; priority.&lt;br /&gt; ◉: &lt;code&gt;fetchpriority=&amp;quot;auto&amp;quot;&lt;/code&gt;&lt;br /&gt; ⬆: &lt;code&gt;fetchpriority=&amp;quot;high&amp;quot;&lt;/code&gt;&lt;br /&gt; ⬇: &lt;code&gt;fetchpriority=&amp;quot;low&amp;quot;&lt;/code&gt;&lt;br /&gt; Images within the viewport start at &amp;quot;Low&amp;quot; priority and then at layout time are boosted to &amp;quot;High&amp;quot;. By tagging it in markup using &lt;code&gt;fetchpriority=&amp;quot;high&amp;quot;&lt;/code&gt;, it can start at &amp;quot;High&amp;quot; immediately and load much faster. &lt;/div&gt;&lt;/aside&gt;
&lt;p&gt;Note that &lt;code&gt;fetchpriority&lt;/code&gt; sets the &lt;em&gt;relative priority&lt;/em&gt;—that is it raises or lowers the default priority by an appropriate amount, rather than explicitly setting the priority to &amp;quot;High&amp;quot; or &amp;quot;Low&amp;quot; and the browser decides the relative priority. Often this is &amp;quot;High&amp;quot; or &amp;quot;Low&amp;quot;, but not always. For example, critical CSS with &lt;code&gt;fetchpriority=&amp;quot;high&amp;quot;&lt;/code&gt; will still retain the &amp;quot;VeryHigh&amp;quot;/&amp;quot;Highest&amp;quot; priority, and using &lt;code&gt;fetchpriority=&amp;quot;low&amp;quot;&lt;/code&gt; on these will still retain the &amp;quot;High&amp;quot; priority—in neither case is the Priority explicitly set to &amp;quot;High&amp;quot; or &amp;quot;Low&amp;quot;.&lt;/p&gt;
&lt;h3 id=&quot;use-cases&quot;&gt;Use cases &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/fetch-priority/#use-cases&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;You can use the &lt;code&gt;fetchpriority&lt;/code&gt; attribute to address scenarios where you may wish to provide the browser with an extra hint as to what priority to fetch a resource with.&lt;/p&gt;
&lt;h4 id=&quot;increase-the-priority-of-the-lcp-image&quot;&gt;Increase the priority of the LCP image &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/fetch-priority/#increase-the-priority-of-the-lcp-image&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;You can specify &lt;code&gt;fetchpriority=&amp;quot;high&amp;quot;&lt;/code&gt; to boost the priority of the LCP or other critical images.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;img&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;lcp-image.jpg&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;fetchpriority&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;high&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;The following comparison shows the Google Flights page with an LCP background image loaded with and without Fetch Priority. With the priority set to high, the &lt;a href=&quot;https://www.webpagetest.org/video/compare.php?tests=211006_AiDcG3_40871b05d6040112a05be4524565cf5d%2C211006_BiDcHR_bebed947f1b6607f2d97e8a899fdc36b&amp;amp;thumbSize=200&amp;amp;ival=100&amp;amp;end=visual&quot; rel=&quot;noopener&quot;&gt;LCP improved from 2.6s to 1.9s&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;
  &lt;video autoplay=&quot;&quot; controls=&quot;&quot; loop=&quot;&quot; muted=&quot;&quot; playsinline=&quot;&quot;&gt;      &lt;source src=&quot;https://storage.googleapis.com/web-dev-uploads/video/1L2RBhCLSnXjCnSlevaDjy3vba73/BCngJfoVOy0YbUz8wFrM.mp4&quot; type=&quot;video/mp4&quot; /&gt;    &lt;/video&gt;
  &lt;figcaption&gt;An experiment conducted using Cloudflare workers to rewrite the Google Flights page to use Fetch Priority.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h4 id=&quot;lower-the-priority-of-above-the-fold-images&quot;&gt;Lower the priority of above-the-fold images &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/fetch-priority/#lower-the-priority-of-above-the-fold-images&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;You can use &lt;code&gt;fetchpriority=&amp;quot;low&amp;quot;&lt;/code&gt; to lower the priority of above-the-fold images that may not be important for example in an image carousel.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;ul&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;carousel&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;img&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;img/carousel-1.jpg&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;fetchpriority&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;high&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;img&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;img/carousel-2.jpg&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;fetchpriority&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;low&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;img&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;img/carousel-3.jpg&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;fetchpriority&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;low&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;img&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;img/carousel-4.jpg&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;fetchpriority&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;low&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;ul&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;In an earlier experiment with the &lt;a href=&quot;https://github.com/google/oodle-demo&quot; rel=&quot;noopener&quot;&gt;Oodle&lt;/a&gt; app, we used this to lower the priority of images that do not appear on load. It helped to cut down the load time by 2 seconds.&lt;/p&gt;
&lt;figure&gt;
  &lt;img alt=&quot;A side-by-side comparison of Fetch Priority when used on the Oodle app&amp;#x27;s image carousel. On the left, the browser sets default priorities for carousel images, but downloads and paints those images around two seconds slower than the example on the right, which sets a higher priority on only the first carousel image.&quot; decoding=&quot;async&quot; height=&quot;460&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Tn4OkGpqPbrSQtd1j3GV.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Tn4OkGpqPbrSQtd1j3GV.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Tn4OkGpqPbrSQtd1j3GV.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Tn4OkGpqPbrSQtd1j3GV.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Tn4OkGpqPbrSQtd1j3GV.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Tn4OkGpqPbrSQtd1j3GV.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Tn4OkGpqPbrSQtd1j3GV.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Tn4OkGpqPbrSQtd1j3GV.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Tn4OkGpqPbrSQtd1j3GV.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Tn4OkGpqPbrSQtd1j3GV.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Tn4OkGpqPbrSQtd1j3GV.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Tn4OkGpqPbrSQtd1j3GV.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Tn4OkGpqPbrSQtd1j3GV.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Tn4OkGpqPbrSQtd1j3GV.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Tn4OkGpqPbrSQtd1j3GV.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Tn4OkGpqPbrSQtd1j3GV.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Tn4OkGpqPbrSQtd1j3GV.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/jL3OLOhcWUQDnR4XjewLBx4e3PC3/Tn4OkGpqPbrSQtd1j3GV.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;/figure&gt;
&lt;h4 id=&quot;lower-the-priority-of-preloaded-resources&quot;&gt;Lower the priority of preloaded resources &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/fetch-priority/#lower-the-priority-of-preloaded-resources&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;To stop preloaded resources from competing with other critical resources, you could provide a hint to reduce their priority. You can use this technique with images, scripts, and CSS.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;&amp;lt;!-- Lower priority only for non-critical preloaded scripts --&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;link&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;rel&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;preload&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;as&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;script&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;critical-script.js&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;link&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;rel&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;preload&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;/js/script.js&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;as&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;script&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;fetchpriority&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;low&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token comment&quot;&gt;&amp;lt;!-- Preload CSS without blocking other resources --&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;link&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;rel&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;preload&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;as&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;style&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;theme.css&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;fetchpriority&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;low&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token special-attr&quot;&gt;&lt;span class=&quot;token attr-name&quot;&gt;onload&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;token value javascript language-javascript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;rel&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;stylesheet&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;h4 id=&quot;reprioritize-scripts&quot;&gt;Reprioritize scripts &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/fetch-priority/#reprioritize-scripts&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Scripts required to make some parts of the page interactive are essential but should not block other resources. You can mark these as async with high priority.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;script&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;async_but_important.js&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;fetchpriority&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;high&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token script&quot;&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;script&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Scripts cannot be marked as async if they rely on specific DOM states. However if they are lower down on the page, they may be downloaded with a lower priority as shown.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;script&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;blocking_but_unimportant.js&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;fetchpriority&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;low&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token script&quot;&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;script&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;h4 id=&quot;lower-the-priority-for-non-critical-data-fetches&quot;&gt;Lower the priority for non-critical data fetches &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/fetch-priority/#lower-the-priority-for-non-critical-data-fetches&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;The browser executes &lt;code&gt;fetch&lt;/code&gt; with a high priority. If you have multiple fetches that may be fired simultaneously, you can use the high default priority for the more critical data fetches and lower it for less critical data.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;// Important validation data (high by default)&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; authenticate &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;/user&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token comment&quot;&gt;// Less important content data (suggested low)&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; suggestedContent &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;/content/suggested&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token literal-property property&quot;&gt;priority&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;low&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;h2 id=&quot;fetch-priority-implementation-notes&quot;&gt;Fetch Priority implementation notes &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/fetch-priority/#fetch-priority-implementation-notes&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Fetch Priority can improve performance in specific use cases, as discussed above. There are some things to be aware of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The &lt;code&gt;fetchpriority&lt;/code&gt; attribute is a hint and not a directive. The browser will try to respect the developer&#39;s preference. It is also possible that the browser will apply its preferences for resource priority as deemed necessary in case of conflicts.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Fetch Priority should not be confused with a preload. They are both distinct because:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Preload is a mandatory fetch and not a hint.&lt;/li&gt;
&lt;li&gt;Preload allows the browser to discover the resource early, but it will still fetch it with the default priority. Conversely, Fetch Priority does not aid discoverability, but does allow you to increase or decrease the fetch priority.&lt;/li&gt;
&lt;li&gt;It is easier to observe and measure the effects of a preload.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Fetch Priority can complement preloads by increasing the granularity of prioritization. If you had already specified a preload as one of the first items in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; for an LCP image, then a &lt;code&gt;high&lt;/code&gt; Fetch Priority may not result in significant gains. However, if the preload was after other resources, then a &lt;code&gt;high&lt;/code&gt; Fetch Priority can improve the LCP. If a critical image is a CSS background image, you should preload it with &lt;code&gt;fetchpriority = &amp;quot;high&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The noticeable gains due to prioritization will be more relevant in environments where more resources contend for the available network bandwidth. This is common for HTTP/1.x connections where parallel downloads are not possible or in low bandwidth HTTP/2 connections. Prioritization can resolve bottlenecks in these conditions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CDNs do &lt;a href=&quot;https://github.com/andydavies/http2-prioritization-issues#cdns--cloud-hosting-services&quot; rel=&quot;noopener&quot;&gt;not uniformly implement HTTP/2 prioritization&lt;/a&gt;. Even if the browser communicates the priority suggested using Fetch Priority; the CDN may not reprioritize resources in the required order. This makes testing of Fetch Priority difficult. The priorities are applied both internally within the browser and with protocols that support prioritization (HTTP/2 and HTTP/3). It is still worth using even for just the internal browser prioritization independent of CDN or origin support, as that will often change when resources are requested by the browser—for example low priority resources like images are often held back from being requested while the browser processes the critical &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; items.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It may not be possible to introduce Fetch Priority as a best practice in your initial design. It is an optimization that you can apply later in the development cycle. You can check the priorities being assigned to different resources on the page, and if they do not match your expectations, you could introduce Fetch Priority for further optimization.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;using-preload-after-chrome-95&quot;&gt;Using Preload after Chrome 95 &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/fetch-priority/#using-preload-after-chrome-95&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The Fetch Priority feature was available for trial in Chrome 73 to 76 but was not released due to prioritization issues with preloads fixed in Chrome 95. Prior to Chrome 95, requests issued via &lt;code&gt;&amp;lt;link rel=preload&amp;gt;&lt;/code&gt; always start before other requests seen by the preload scanner, even if the other requests have a higher priority.&lt;/p&gt;
&lt;p&gt;With the fix in Chrome 95 and the enhancement for Fetch Priority, we hope that developers will start using preload for its &lt;a href=&quot;https://www.smashingmagazine.com/2016/02/preload-what-is-it-good-for/#loading-of-late-discovered-resources&quot; rel=&quot;noopener&quot;&gt;intended purpose&lt;/a&gt;—to preload resources not detected by the parser (fonts, imports, background LCP images). The placement of the &lt;code&gt;preload&lt;/code&gt; hint will affect when the resource is preloaded. Some key points on using preload are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Including the preload in HTTP headers will cause it to jump ahead of everything else.&lt;/li&gt;
&lt;li&gt;Generally, preloads will load in the order the parser gets to them for anything above &amp;quot;Medium&amp;quot; priority—so be careful if you are including preloads at the beginning of the HTML.&lt;/li&gt;
&lt;li&gt;Font preloads will probably work best towards the end of the head or beginning of the body.&lt;/li&gt;
&lt;li&gt;Import preloads (dynamic &lt;code&gt;import()&lt;/code&gt; or &lt;code&gt;modulepreload&lt;/code&gt;) should be done after the script tag that needs the import (so the actual script gets loaded/parsed first). Basically, if the script tag loads a script that will trigger the load of dependencies, make sure the &lt;code&gt;&amp;lt;link rel=preload&amp;gt;&lt;/code&gt; for the dependencies is after the parent script tag, otherwise the dependencies may end up loading before the main script. In the proper order, the main script can be parsed/eval&#39;d while the dependencies are loading.&lt;/li&gt;
&lt;li&gt;Image preloads will have a &amp;quot;Low&amp;quot; priority (without Fetch Priority) and should be ordered relative to async scripts and other low or lowest priority tags.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;history&quot;&gt;History &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/fetch-priority/#history&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Fetch Priority was first experimented with in Chrome as an origin trial in 2018 and then again in 2021 using the &lt;code&gt;importance&lt;/code&gt; attribute. At that time it was known as &lt;a href=&quot;https://github.com/WICG/priority-hints&quot; rel=&quot;noopener&quot;&gt;Priority Hints&lt;/a&gt;. The interface has since changed to &lt;code&gt;fetchpriority&lt;/code&gt; for HTML and &lt;code&gt;priority&lt;/code&gt; for JavaScript&#39;s Fetch API as part of the web standards process. To reduce confusion we now refer to this API as Fetch Priority.&lt;/p&gt;
&lt;h2 id=&quot;browser-compatibility&quot;&gt;Browser compatibility &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/fetch-priority/#browser-compatibility&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;wdi-browser-compat&quot;&gt;
  &lt;span class=&quot;wdi-browser-compat__label&quot;&gt;Browser support&lt;/span&gt;
  &lt;ul class=&quot;wdi-browser-compat__items&quot;&gt;
    &lt;li class=&quot;wdi-browser-compat__item&quot;&gt;
    &lt;span class=&quot;wdi-browser-compat__icon&quot; data-browser=&quot;chrome&quot;&gt;
      &lt;span class=&quot;visually-hidden&quot;&gt;Chrome 102, Supported&lt;/span&gt;
    &lt;/span&gt;
    &lt;span class=&quot;wdi-browser-compat__version&quot; data-compat=&quot;yes&quot; title=&quot;Supported&quot; aria-label=&quot;Supported&quot;&gt;
      102
    &lt;/span&gt;
    &lt;/li&gt;&lt;li class=&quot;wdi-browser-compat__item&quot;&gt;
    &lt;span class=&quot;wdi-browser-compat__icon&quot; data-browser=&quot;firefox&quot;&gt;
      &lt;span class=&quot;visually-hidden&quot;&gt;Firefox, Not supported&lt;/span&gt;
    &lt;/span&gt;
    &lt;span class=&quot;wdi-browser-compat__version&quot; data-compat=&quot;no&quot; title=&quot;Not supported&quot; aria-label=&quot;Not supported&quot;&gt;
&lt;p&gt;&lt;/p&gt;&lt;/span&gt;
&lt;/li&gt;&lt;li class=&quot;wdi-browser-compat__item&quot;&gt;
&lt;span class=&quot;wdi-browser-compat__icon&quot; data-browser=&quot;edge&quot;&gt;
&lt;span class=&quot;visually-hidden&quot;&gt;Edge 102, Supported&lt;/span&gt;
&lt;/span&gt;
&lt;span class=&quot;wdi-browser-compat__version&quot; data-compat=&quot;yes&quot; title=&quot;Supported&quot; aria-label=&quot;Supported&quot;&gt;
102
&lt;/span&gt;
&lt;/li&gt;&lt;li class=&quot;wdi-browser-compat__item&quot;&gt;
&lt;span class=&quot;wdi-browser-compat__icon&quot; data-browser=&quot;safari&quot;&gt;
&lt;span class=&quot;visually-hidden&quot;&gt;Safari preview, Preview&lt;/span&gt;
&lt;/span&gt;
&lt;span class=&quot;wdi-browser-compat__version&quot; data-compat=&quot;preview&quot; title=&quot;Preview&quot; aria-label=&quot;Preview&quot;&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;/span&gt;
&lt;/li&gt;&lt;p&gt;&lt;/p&gt;
  &lt;/ul&gt;
  &lt;a class=&quot;wdi-browser-compat__link&quot; href=&quot;https://developer.mozilla.org/docs/Web/API/HTMLImageElement/fetchPriority#browser_compatibility&quot; target=&quot;_blank&quot;&gt;Source&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;As of this writing, Fetch Priority is only available in Chromium-based browsers. Other browser engines or earlier versions of Chromium browsers will ignore the attribute and use their default prioritization heuristics. Until another browser implements Fetch Priority, you may notice some references—&lt;a href=&quot;https://developer.mozilla.org/docs/Web/API/HTMLImageElement/fetchPriority&quot; rel=&quot;noopener&quot;&gt;such as MDN&lt;/a&gt;—mark this as &lt;a href=&quot;https://developer.mozilla.org/docs/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental&quot; rel=&quot;noopener&quot;&gt;&lt;em&gt;Experimental&lt;/em&gt;&lt;/a&gt;, however Fetch Priority is now standardized and included in the &lt;a href=&quot;https://html.spec.whatwg.org/multipage/urls-and-fetching.html#fetch-priority-attributes&quot; rel=&quot;noopener&quot;&gt;HTML living standard&lt;/a&gt; and &lt;a href=&quot;https://fetch.spec.whatwg.org/#request-priority&quot; rel=&quot;noopener&quot;&gt;Fetch living standard&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/fetch-priority/#conclusion&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Developers are likely to be interested in Fetch Priority with the fixes in preload behavior and the recent focus on Core Web Vitals and LCP. They now have additional knobs available to achieve their desired loading sequence.&lt;/p&gt;
</content>
    <author>
      <name>Leena Sohoni</name>
    </author><author>
      <name>Addy Osmani</name>
    </author><author>
      <name>Patrick Meenan</name>
    </author><author>
      <name>Barry Pollard</name>
    </author>
  </entry>
  
  <entry>
    <title>Best practices for using third-party embeds</title>
    <link href="https://web.dev/embed-best-practices/"/>
    <updated>2021-10-05T00:00:00Z</updated>
    <id>https://web.dev/embed-best-practices/</id>
    <content type="html" mode="escaped">&lt;p&gt;Many sites use third-party embeds to create an engaging user experience by delegating some sections of a web page to another content provider. The most common examples of third-party content embeds are video players, social-media feeds, maps, and advertisements.&lt;/p&gt;
&lt;p&gt;Third-party content can impact the performance of a page in many ways. It can be render-blocking, contend with other critical resources for network and bandwidth, or affect the Core Web Vitals metrics. Third-party embeds may also cause layout shifts as they load. This article discusses performance best practices that you can use when loading third-party embeds, efficient loading techniques, and the Layout Shift Terminator tool that helps reduce layout shifts for popular embeds.&lt;/p&gt;
&lt;aside class=&quot;aside flow bg-state-info-bg color-state-info-text&quot;&gt;&lt;div class=&quot; flow&quot;&gt; It&#39;s best to use the techniques described in this post to load only offscreen or non-primary page content. This ensures that all the critical content gets indexed by &lt;a href=&quot;https://developers.google.com/search/docs/advanced/javascript/lazy-loading&quot;&gt;search engines&lt;/a&gt;. &lt;/div&gt;&lt;/aside&gt;
&lt;h2 id=&quot;what-is-an-embed&quot;&gt;What is an embed &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/embed-best-practices/#what-is-an-embed&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A third-party embed is any content displayed on your site that is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Not authored by you&lt;/li&gt;
&lt;li&gt;Served from third-party servers&lt;/li&gt;
&lt;/ul&gt;
&lt;img alt=&quot;Multiple offscreen embeds are shown, which could be lazy-loaded&quot; decoding=&quot;async&quot; height=&quot;450&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/QfPvNJo9yN6IcxvWqYWI.jpeg?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/QfPvNJo9yN6IcxvWqYWI.jpeg?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/QfPvNJo9yN6IcxvWqYWI.jpeg?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/QfPvNJo9yN6IcxvWqYWI.jpeg?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/QfPvNJo9yN6IcxvWqYWI.jpeg?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/QfPvNJo9yN6IcxvWqYWI.jpeg?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/QfPvNJo9yN6IcxvWqYWI.jpeg?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/QfPvNJo9yN6IcxvWqYWI.jpeg?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/QfPvNJo9yN6IcxvWqYWI.jpeg?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/QfPvNJo9yN6IcxvWqYWI.jpeg?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/QfPvNJo9yN6IcxvWqYWI.jpeg?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/QfPvNJo9yN6IcxvWqYWI.jpeg?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/QfPvNJo9yN6IcxvWqYWI.jpeg?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/QfPvNJo9yN6IcxvWqYWI.jpeg?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/QfPvNJo9yN6IcxvWqYWI.jpeg?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/QfPvNJo9yN6IcxvWqYWI.jpeg?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/QfPvNJo9yN6IcxvWqYWI.jpeg?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/QfPvNJo9yN6IcxvWqYWI.jpeg?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;p&gt;Embeds are frequently used in the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Websites related to sports, news, entertainment, and fashion use videos to augment textual content.&lt;/li&gt;
&lt;li&gt;Organizations with active Twitter or social media accounts embed feeds from these accounts to their web pages to engage and reach out to more people.&lt;/li&gt;
&lt;li&gt;Restaurant, park, and event venue pages often embed maps.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Third-party embeds are typically loaded in &lt;a href=&quot;https://developer.mozilla.org/docs/Web/HTML/Element/iframe&quot; rel=&quot;noopener&quot;&gt;&lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt;&lt;/a&gt; elements on the page. Third-party providers offer HTML snippets often consisting of an &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt; that pulls in a page composed of markup, scripts, and stylesheets. Some providers also use a script snippet that dynamically injects an &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt; to pull other content in. This can make the third-party embeds heavy and affect the performance of the page by delaying its first-party content.&lt;/p&gt;
&lt;h2 id=&quot;performance-impact-of-third-party-embeds&quot;&gt;Performance impact of third-party embeds &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/embed-best-practices/#performance-impact-of-third-party-embeds&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Many popular embeds include over 100 KB of JavaScript, sometimes even going up to 2 MB. They take more time to load and keep the main thread busy when executing. Performance monitoring tools such as &lt;a href=&quot;https://developer.chrome.com/docs/lighthouse/overview/&quot; rel=&quot;noopener&quot;&gt;Lighthouse&lt;/a&gt; and &lt;a href=&quot;https://developer.chrome.com/docs/devtools/&quot; rel=&quot;noopener&quot;&gt;Chrome DevTools&lt;/a&gt; help to &lt;a href=&quot;https://web.dev/identify-slow-third-party-javascript/&quot;&gt;measure the impact of third-party embeds on performance&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://developer.chrome.com/docs/lighthouse/performance/third-party-summary/&quot; rel=&quot;noopener&quot;&gt;Reduce the impact of third-party code&lt;/a&gt; Lighthouse audit shows the list of third-party providers a page uses, with size and main-thread blocking time. The audit is available through Chrome DevTools under the Lighthouse tab.&lt;/p&gt;
&lt;p&gt;It is a good practice to periodically audit the performance impact of your embeds and third-party code because embed source code may change. You can use this opportunity to remove any redundant code.&lt;/p&gt;
&lt;img alt=&quot;Reduce the impact of third-party code&quot; decoding=&quot;async&quot; height=&quot;738&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/WektrXQsgQPMWy2hxQ4E.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/WektrXQsgQPMWy2hxQ4E.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/WektrXQsgQPMWy2hxQ4E.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/WektrXQsgQPMWy2hxQ4E.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/WektrXQsgQPMWy2hxQ4E.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/WektrXQsgQPMWy2hxQ4E.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/WektrXQsgQPMWy2hxQ4E.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/WektrXQsgQPMWy2hxQ4E.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/WektrXQsgQPMWy2hxQ4E.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/WektrXQsgQPMWy2hxQ4E.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/WektrXQsgQPMWy2hxQ4E.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/WektrXQsgQPMWy2hxQ4E.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/WektrXQsgQPMWy2hxQ4E.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/WektrXQsgQPMWy2hxQ4E.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/WektrXQsgQPMWy2hxQ4E.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/WektrXQsgQPMWy2hxQ4E.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/WektrXQsgQPMWy2hxQ4E.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/WektrXQsgQPMWy2hxQ4E.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;h2 id=&quot;loading-best-practices&quot;&gt;Loading best practices &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/embed-best-practices/#loading-best-practices&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Third-party embeds can negatively impact performance, but they also offer important functionalities. To efficiently use third-party embeds and reduce their performance impact, follow the guidelines below.&lt;/p&gt;
&lt;h3 id=&quot;script-ordering&quot;&gt;Script ordering &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/embed-best-practices/#script-ordering&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In a well-designed page, the key first-party content will be the focus of the page, while the third-party embeds will occupy side-bars or appear after the first-party content.&lt;/p&gt;
&lt;p&gt;For the best user experience, the main content should load quickly and before any other supporting content. For example, the news text on a news page should load before embeds for a Twitter feed or advertisements.&lt;/p&gt;
&lt;p&gt;Requests for third-party embeds can get in the way of loading first-party content, so the position of a third-party script tag is important. Scripts can affect the loading sequence because the DOM construction pauses while scripts are executed. Place third-party script tags after the key first-party tags and &lt;a href=&quot;https://web.dev/efficiently-load-third-party-javascript/#use-async-or-defer&quot;&gt;use &lt;code&gt;async&lt;/code&gt; or &lt;code&gt;defer&lt;/code&gt;&lt;/a&gt; attributes to load them asynchronously.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;head&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;title&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Order of Things&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;title&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;link&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;rel&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;stylesheet&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;media&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;screen&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;/assets/application.css&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;script&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;index.js&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token script&quot;&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;script&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;script&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;https://example.com/3p-library.js&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;async&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token script&quot;&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;script&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;head&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;h3 id=&quot;lazy-loading&quot;&gt;Lazy-loading &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/embed-best-practices/#lazy-loading&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Since third-party content usually comes after the primary content, it may not be visible in the viewport when the page loads. In that case, downloading third-party resources may be deferred until the user scrolls down to that part of the page. This not only helps optimize the initial page load but also reduces the download costs for users on fixed data plans and slow network connections.&lt;/p&gt;
&lt;p&gt;Delaying the download of content until it is actually needed is called &lt;a href=&quot;https://web.dev/lazy-loading-best-practices/&quot;&gt;lazy-loading&lt;/a&gt;. Depending on the requirements and the type of embed, you can use different lazy-loading techniques explained below.&lt;/p&gt;
&lt;h4 id=&quot;native-lazy-loading-for-lessiframegreater&quot;&gt;Native lazy-loading for &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt; &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/embed-best-practices/#native-lazy-loading-for-lessiframegreater&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;For third-party embeds loaded through &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt; elements, you can use browser-level lazy-loading to defer loading offscreen iframes until users scroll near them. The &lt;a href=&quot;https://web.dev/iframe-lazy-loading/&quot;&gt;loading attribute for &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt; is available in Chrome 77&lt;/a&gt; and above and has &lt;a href=&quot;https://caniuse.com/loading-lazy-attr&quot; rel=&quot;noopener&quot;&gt;also been introduced&lt;/a&gt; to other Chromium-based browsers.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;iframe&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;https://example.com&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;       &lt;span class=&quot;token attr-name&quot;&gt;loading&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;lazy&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;       &lt;span class=&quot;token attr-name&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;600&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;       &lt;span class=&quot;token attr-name&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;400&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;iframe&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;The loading attribute supports the following values:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;lazy&lt;/code&gt;: Indicates that the browser should defer loading the iframe. The browser will load the iframe when it is nearing the viewport. Use if the iframe is a good candidate for lazy-loading.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;eager&lt;/code&gt;: Loads the iframe immediately. Use if the iframe is not a good candidate for lazy-loading. If the &lt;code&gt;loading&lt;/code&gt; attribute has not been specified, this is the default behavior—except in &lt;a href=&quot;https://support.google.com/chrome/answer/2392284?hl=en&amp;amp;co=GENIE.Platform%3DAndroid&quot; rel=&quot;noopener&quot;&gt;Lite mode&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;auto&lt;/code&gt;: The browser determines whether to lazy-load this frame.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Browsers that don’t support the &lt;code&gt;loading&lt;/code&gt; attribute ignore it, so you can apply native lazy-loading as a progressive enhancement. Browsers that support the attribute may have different implementations for the &lt;a href=&quot;https://web.dev/browser-level-image-lazy-loading/#distance-from-viewport-thresholds&quot;&gt;distance-from-viewport&lt;/a&gt; threshold (the distance at which the iframe starts loading).&lt;/p&gt;
&lt;p&gt;Following are some ways in which you can lazy load iframes for different types of embeds.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;YouTube videos: To lazy-load a YouTube video player iframe,  include the &lt;code&gt;loading&lt;/code&gt; attribute to the embed code provided by YouTube. Lazy loading the YouTube embed can save approximately 500 KB on the initial page load.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;iframe&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;https://www.youtube.com/embed/aKydtOXW8mI&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token attr-name&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;560&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;315&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token attr-name&quot;&gt;loading&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;lazy&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token attr-name&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;YouTube video player&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token attr-name&quot;&gt;frameborder&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token attr-name&quot;&gt;allow&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;accelerometer; autoplay; clipboard-write;&lt;br /&gt;            encrypted-media; gyroscope; picture-in-picture&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token attr-name&quot;&gt;allowfullscreen&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;iframe&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;Google Maps: To lazy-load a Google Map iframe, include the &lt;code&gt;loading&lt;/code&gt; attribute in the code for the iframe embed generated by the &lt;a href=&quot;https://developers.google.com/maps/documentation/embed/get-started&quot; rel=&quot;noopener&quot;&gt;Google Maps Embed API&lt;/a&gt;. Following is an example of the code with a placeholder for the Google Cloud API key.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;iframe&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;https://www.google.com/maps/embed/v1/place?key=API_KEY&amp;amp;q=PLACE_ID&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token attr-name&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;600&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;450&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token special-attr&quot;&gt;&lt;span class=&quot;token attr-name&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;token value css language-css&quot;&gt;&lt;span class=&quot;token property&quot;&gt;border&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token attr-name&quot;&gt;allowfullscreen&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token attr-name&quot;&gt;loading&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;lazy&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;iframe&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;h4 id=&quot;lazysizes-library&quot;&gt;lazysizes library &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/embed-best-practices/#lazysizes-library&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Because browsers use an embed’s distance-from-viewport, in addition to signals like &lt;a href=&quot;https://googlechrome.github.io/samples/network-information/&quot; rel=&quot;noopener&quot;&gt;effective connection type&lt;/a&gt; and Lite-mode, to decide when an iframe should be loaded, native lazy-loading can be inconsistent. If you need better control on the distance thresholds or you want to provide a consistent lazy-loading experience across browsers, you can use the &lt;a href=&quot;https://github.com/aFarkas/lazysizes&quot; rel=&quot;noopener&quot;&gt;lazysizes&lt;/a&gt; library.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/aFarkas/lazysizes&quot; rel=&quot;noopener&quot;&gt;lazysizes&lt;/a&gt; is a fast, SEO-friendly lazy loader for both images and iframes. Once you have downloaded the component, it can be used with an iframe for a YouTube embed as follows.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;script&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;lazysizes.min.js&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;async&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token script&quot;&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;script&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;iframe&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;data-src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;https://www.youtube.com/embed/aKydtOXW8mI&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token attr-name&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;560&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;315&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;lazyload&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token attr-name&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;YouTube video player&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token attr-name&quot;&gt;frameborder&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token attr-name&quot;&gt;allow&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;accelerometer; autoplay; clipboard-write;&lt;br /&gt;        encrypted-media; gyroscope; picture-in-picture&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token attr-name&quot;&gt;allowfullscreen&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;iframe&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Similarly, lazysizes may be used with iframes for other third-party embeds.&lt;/p&gt;
&lt;p&gt;Note that lazysizes uses the &lt;a href=&quot;https://developer.mozilla.org/docs/Web/API/Intersection_Observer_API&quot; rel=&quot;noopener&quot;&gt;Intersection Observer API&lt;/a&gt; to detect when an element becomes visible.&lt;/p&gt;
&lt;h4 id=&quot;using-data-lazy-in-facebook&quot;&gt;Using data-lazy in Facebook &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/embed-best-practices/#using-data-lazy-in-facebook&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Facebook provides different types of &lt;a href=&quot;https://developers.facebook.com/docs/plugins&quot; rel=&quot;noopener&quot;&gt;social plugins&lt;/a&gt; that can be embedded. This includes posts, comments, videos, and the most popular &lt;em&gt;Like&lt;/em&gt; button. All plugins include a setting for &lt;code&gt;data-lazy&lt;/code&gt;. Setting it to &lt;code&gt;true&lt;/code&gt; ensures that the plugin will use the browser&#39;s lazy-loading mechanism by setting the &lt;code&gt;loading=&amp;quot;lazy&amp;quot;&lt;/code&gt; iframe attribute.&lt;/p&gt;
&lt;h4 id=&quot;lazy-loading-instagram-feeds&quot;&gt;Lazy-loading Instagram feeds &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/embed-best-practices/#lazy-loading-instagram-feeds&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Instagram provides a block of markup and a script as part of the embed. The script injects an &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt; into the page. Lazy-loading this &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt; can improve performance as the embed can be over 100 KB gzipped in size. Many Instagram plugins for WordPress sites like &lt;a href=&quot;https://wordpress.org/plugins/instagram-widget-by-wpzoom/&quot; rel=&quot;noopener&quot;&gt;WPZoom&lt;/a&gt; and &lt;a href=&quot;https://www.mapledesign.co.uk/tech-blog/elfsight-instagram-feed-performance/&quot; rel=&quot;noopener&quot;&gt;Elfsight&lt;/a&gt; provide the lazy-loading option.&lt;/p&gt;
&lt;h3 id=&quot;replace-embeds-with-facades&quot;&gt;Replace embeds with facades &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/embed-best-practices/#replace-embeds-with-facades&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;While interactive embeds add value to the page, many users may not interact with them. For example, not every user browsing a restaurant page will click, expand, scroll, and navigate the map embed. Similarly, not every user to a telecom service providers page will interact with the chatbot. In these cases, you can avoid loading or lazy-loading the embed altogether by displaying a facade in its place.&lt;/p&gt;
&lt;div class=&quot;switcher&quot;&gt;
  &lt;figure&gt;
    &lt;figcaption&gt;
      A map embed with a zoom in and out feature.
    &lt;/figcaption&gt;
    &lt;img alt=&quot;A map embed&quot; decoding=&quot;async&quot; height=&quot;725&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/Cn0x7aeqCw7M0X5b4L1P.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/Cn0x7aeqCw7M0X5b4L1P.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/Cn0x7aeqCw7M0X5b4L1P.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/Cn0x7aeqCw7M0X5b4L1P.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/Cn0x7aeqCw7M0X5b4L1P.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/Cn0x7aeqCw7M0X5b4L1P.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/Cn0x7aeqCw7M0X5b4L1P.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/Cn0x7aeqCw7M0X5b4L1P.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/Cn0x7aeqCw7M0X5b4L1P.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/Cn0x7aeqCw7M0X5b4L1P.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/Cn0x7aeqCw7M0X5b4L1P.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/Cn0x7aeqCw7M0X5b4L1P.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/Cn0x7aeqCw7M0X5b4L1P.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/Cn0x7aeqCw7M0X5b4L1P.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/Cn0x7aeqCw7M0X5b4L1P.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/Cn0x7aeqCw7M0X5b4L1P.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/Cn0x7aeqCw7M0X5b4L1P.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/Cn0x7aeqCw7M0X5b4L1P.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
  &lt;/figure&gt;
  &lt;figure&gt;
    &lt;figcaption&gt;
      A map facade that is an image.
    &lt;/figcaption&gt;
    &lt;img alt=&quot;A map facade&quot; decoding=&quot;async&quot; height=&quot;541&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/f8z9MfvgIFiBkCLA1Qud.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/f8z9MfvgIFiBkCLA1Qud.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/f8z9MfvgIFiBkCLA1Qud.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/f8z9MfvgIFiBkCLA1Qud.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/f8z9MfvgIFiBkCLA1Qud.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/f8z9MfvgIFiBkCLA1Qud.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/f8z9MfvgIFiBkCLA1Qud.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/f8z9MfvgIFiBkCLA1Qud.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/f8z9MfvgIFiBkCLA1Qud.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/f8z9MfvgIFiBkCLA1Qud.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/f8z9MfvgIFiBkCLA1Qud.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/f8z9MfvgIFiBkCLA1Qud.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/f8z9MfvgIFiBkCLA1Qud.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/f8z9MfvgIFiBkCLA1Qud.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/f8z9MfvgIFiBkCLA1Qud.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/f8z9MfvgIFiBkCLA1Qud.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/f8z9MfvgIFiBkCLA1Qud.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/f8z9MfvgIFiBkCLA1Qud.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
  &lt;/figure&gt;
&lt;/div&gt;
&lt;p&gt;A &lt;a href=&quot;https://developer.chrome.com/docs/lighthouse/performance/third-party-facades/&quot; rel=&quot;noopener&quot;&gt;facade&lt;/a&gt; is a static element that looks similar to the actual embedded third-party but is not functional and, therefore, much less taxing on the page load. Following are a few strategies to load such embeds optimally while still providing some value to the user.&lt;/p&gt;
&lt;h4 id=&quot;use-static-images-as-facades&quot;&gt;Use static images as facades &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/embed-best-practices/#use-static-images-as-facades&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Static images can be used instead of map embeds where you might not need to make the map interactive. You can zoom in on the area of interest on the map, capture an image, and use this instead of the interactive map embed. You can also use DevTools &lt;strong&gt;Capture node screenshot&lt;/strong&gt; functionality to capture a screenshot of the embedded &lt;code&gt;iframe&lt;/code&gt; element, as shown below.&lt;/p&gt;
&lt;img alt=&quot;Capture node screenshot&quot; decoding=&quot;async&quot; height=&quot;500&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 400px) 400px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EJvMAEUmF3QNUDGBgfNR.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EJvMAEUmF3QNUDGBgfNR.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EJvMAEUmF3QNUDGBgfNR.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EJvMAEUmF3QNUDGBgfNR.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EJvMAEUmF3QNUDGBgfNR.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EJvMAEUmF3QNUDGBgfNR.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EJvMAEUmF3QNUDGBgfNR.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EJvMAEUmF3QNUDGBgfNR.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EJvMAEUmF3QNUDGBgfNR.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EJvMAEUmF3QNUDGBgfNR.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EJvMAEUmF3QNUDGBgfNR.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EJvMAEUmF3QNUDGBgfNR.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EJvMAEUmF3QNUDGBgfNR.png?auto=format&amp;w=800 800w&quot; width=&quot;400&quot; /&gt;
&lt;p&gt;DevTools captures the image as a  &lt;code&gt;png&lt;/code&gt;, but you can also consider converting it to &lt;code&gt;&lt;a href=&quot;https://web.dev/serve-images-webp/&quot;&gt;WebP format for better performance&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h4 id=&quot;use-dynamic-images-as-facades&quot;&gt;Use dynamic images as facades &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/embed-best-practices/#use-dynamic-images-as-facades&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;This technique allows you to generate images corresponding to an interactive embed at run time. Following are some of the tools that allow you to generate static versions of embeds on your pages.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Maps Static API&lt;/strong&gt;: The Google &lt;a href=&quot;https://developers.google.com/maps/documentation/maps-static/overview&quot; rel=&quot;noopener&quot;&gt;Maps Static API&lt;/a&gt; service generates a map based on the URL parameters included in a standard HTTP request and returns the map as an image you can display on your web page. The URL needs to include the Google Maps API key and must be placed in the &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tag on the page as the &lt;code&gt;src&lt;/code&gt; attribute.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://staticmapmaker.com/google/&quot; rel=&quot;noopener&quot;&gt;Static map maker&lt;/a&gt; tool helps to configure the parameters required for the URL and gives you the code for the image element in real-time.&lt;/p&gt;
&lt;p&gt;The following snippet shows code for an image with the source set to a Maps Static API URL. It has been included in a link tag that ensures that the actual map can be accessed by clicking on the image. (Note: API key attribute is not included in the url)&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;a&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;https://www.google.com/maps/place/Albany,+NY/&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;img&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;https://maps.googleapis.com/maps/api/staticmap?center=Albany,+NY&amp;amp;zoom=13&amp;amp;scale=1&amp;amp;size=600x300&amp;amp;maptype=roadmap&amp;amp;format=png&amp;amp;visual_refresh=true&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;alt&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;Google Map of Albany, NY&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;a&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Twitter screenshots&lt;/strong&gt;: Similar to map screenshots, this concept allows you to dynamically embed a Twitter screenshot instead of the live feed. &lt;a href=&quot;https://tweetpik.com/&quot; rel=&quot;noopener&quot;&gt;Tweetpik&lt;/a&gt; is one of the tools that can be used to take screenshots of tweets. Tweetpik API accepts the URL of the tweet and returns an image with its contents. The API also accepts parameters to customize the background, colors, borders, and dimensions of the image.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;use-click-to-load-to-enhance-facades&quot;&gt;Use click-to-load to enhance facades &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/embed-best-practices/#use-click-to-load-to-enhance-facades&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;The click-to-load concept combines lazy-loading and facades. The page initially loads with the facade. When the user interacts with the static placeholder by clicking on it, the third-party embed is loaded. This is also known as the &lt;a href=&quot;https://addyosmani.com/blog/import-on-interaction/&quot; rel=&quot;noopener&quot;&gt;import on interaction&lt;/a&gt; pattern and can be implemented using the following steps.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;On page load: Facade or static element is included on the page.&lt;/li&gt;
&lt;li&gt;On mouseover: Facade preconnects to the third-party embed provider.&lt;/li&gt;
&lt;li&gt;On click: The facade is replaced by the third-party product.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Facades may be used with third-party embeds for video players, chat widgets, authentication services, and social media widgets. YouTube video embeds that are just images with a play button are facades that we come across frequently. The actual video loads only when you click on the image.&lt;/p&gt;
&lt;p&gt;You can build a custom click-to-load facade using the &lt;em&gt;import on interaction&lt;/em&gt; pattern or use one of the following open source facades available for different types of embeds.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;YouTube facade&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/paulirish/lite-youtube-embed&quot; rel=&quot;noopener&quot;&gt;Lite-youtube-embed&lt;/a&gt; is a recommended facade for the YouTube player, which looks like the real player but is 224 times faster. It can be used by downloading the script and stylesheet and then using the &lt;code&gt;&amp;lt;lite-youtube&amp;gt;&lt;/code&gt; tag in HTML or JavaScript. Custom player parameters supported by YouTube may be included through the &lt;code&gt;params&lt;/code&gt; attribute.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;lite-youtube&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;videoid&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;ogfYd705cRs&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;playlabel&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;Play: Keynote (Google I/O &lt;span class=&quot;token punctuation&quot;&gt;&#39;&lt;/span&gt;18)&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;lite-youtube&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Following is a comparison between the lite-youtube-embed and the actual embed.&lt;/p&gt;
&lt;div class=&quot;switcher&quot;&gt;
  &lt;figure&gt;
    &lt;img alt=&quot;Lite YouTube embed&quot; decoding=&quot;async&quot; height=&quot;521&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EcTxjLs9SUb1ofALN8rA.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EcTxjLs9SUb1ofALN8rA.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EcTxjLs9SUb1ofALN8rA.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EcTxjLs9SUb1ofALN8rA.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EcTxjLs9SUb1ofALN8rA.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EcTxjLs9SUb1ofALN8rA.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EcTxjLs9SUb1ofALN8rA.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EcTxjLs9SUb1ofALN8rA.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EcTxjLs9SUb1ofALN8rA.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EcTxjLs9SUb1ofALN8rA.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EcTxjLs9SUb1ofALN8rA.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EcTxjLs9SUb1ofALN8rA.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EcTxjLs9SUb1ofALN8rA.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EcTxjLs9SUb1ofALN8rA.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EcTxjLs9SUb1ofALN8rA.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EcTxjLs9SUb1ofALN8rA.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EcTxjLs9SUb1ofALN8rA.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/EcTxjLs9SUb1ofALN8rA.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
    &lt;figcaption&gt;
      A lite-YouTube embed
    &lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;figure&gt;
    &lt;img alt=&quot;Actual YouTube embed&quot; decoding=&quot;async&quot; height=&quot;502&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/cYG1NJqM8ZoLkYOi6xFJ.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/cYG1NJqM8ZoLkYOi6xFJ.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/cYG1NJqM8ZoLkYOi6xFJ.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/cYG1NJqM8ZoLkYOi6xFJ.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/cYG1NJqM8ZoLkYOi6xFJ.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/cYG1NJqM8ZoLkYOi6xFJ.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/cYG1NJqM8ZoLkYOi6xFJ.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/cYG1NJqM8ZoLkYOi6xFJ.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/cYG1NJqM8ZoLkYOi6xFJ.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/cYG1NJqM8ZoLkYOi6xFJ.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/cYG1NJqM8ZoLkYOi6xFJ.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/cYG1NJqM8ZoLkYOi6xFJ.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/cYG1NJqM8ZoLkYOi6xFJ.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/cYG1NJqM8ZoLkYOi6xFJ.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/cYG1NJqM8ZoLkYOi6xFJ.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/cYG1NJqM8ZoLkYOi6xFJ.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/cYG1NJqM8ZoLkYOi6xFJ.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/cYG1NJqM8ZoLkYOi6xFJ.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
    &lt;figcaption&gt;
      A YouTube embed
    &lt;/figcaption&gt;
  &lt;/figure&gt;
&lt;/div&gt;
&lt;p&gt;Other similar facades available for YouTube and Vimeo players are &lt;a href=&quot;https://github.com/justinribeiro/lite-youtube&quot; rel=&quot;noopener&quot;&gt;lite-youtube&lt;/a&gt;, &lt;a href=&quot;https://github.com/luwes/lite-vimeo-embed&quot; rel=&quot;noopener&quot;&gt;lite-vimeo-embed&lt;/a&gt;, and &lt;a href=&quot;https://github.com/slightlyoff/lite-vimeo&quot; rel=&quot;noopener&quot;&gt;lite-vimeo&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Chat widget facade&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/calibreapp/react-live-chat-loader&quot; rel=&quot;noopener&quot;&gt;React-live-chat-loader&lt;/a&gt; loads a button that looks like a chat embed instead of the embed itself. It can be used with various chat provider platforms such as Intercom, Help Scout, Messenger, and so on. The look-alike widget is much lighter than the chat-widget and loads faster. It can be replaced by the actual chat widget when the user hovers or clicks on the button or if the page has been idle for a long time. The &lt;a href=&quot;https://wildbit.com/blog/2020/09/30/getting-postmark-lighthouse-performance-score-to-100&quot; rel=&quot;noopener&quot;&gt;Postmark case study&lt;/a&gt; explains how they implemented react-live-chat-loader and performance improvements they achieved.&lt;/p&gt;
 &lt;img alt=&quot;Postmark chat widget&quot; decoding=&quot;async&quot; height=&quot;389&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/XyJON43TV8h1qWNZV1Ev.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/XyJON43TV8h1qWNZV1Ev.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/XyJON43TV8h1qWNZV1Ev.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/XyJON43TV8h1qWNZV1Ev.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/XyJON43TV8h1qWNZV1Ev.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/XyJON43TV8h1qWNZV1Ev.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/XyJON43TV8h1qWNZV1Ev.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/XyJON43TV8h1qWNZV1Ev.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/XyJON43TV8h1qWNZV1Ev.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/XyJON43TV8h1qWNZV1Ev.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/XyJON43TV8h1qWNZV1Ev.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/XyJON43TV8h1qWNZV1Ev.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/XyJON43TV8h1qWNZV1Ev.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/XyJON43TV8h1qWNZV1Ev.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/XyJON43TV8h1qWNZV1Ev.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/XyJON43TV8h1qWNZV1Ev.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/XyJON43TV8h1qWNZV1Ev.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/XyJON43TV8h1qWNZV1Ev.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;remove-or-replace-embeds-with-links&quot;&gt;Remove or replace embeds with links &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/embed-best-practices/#remove-or-replace-embeds-with-links&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;If you find that some third-party embeds result in poor loading performance and using any of the techniques above is not an option, the simplest thing that you can do is remove the embed entirely. If you still want your users to be able to access the content in the embed, you can provide a link to it with &lt;code&gt;target=&amp;quot;_blank&amp;quot;&lt;/code&gt; so that the user can click and view it in another tab.&lt;/p&gt;
&lt;h2 id=&quot;layout-stability&quot;&gt;Layout stability &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/embed-best-practices/#layout-stability&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;While dynamically loading embedded content can improve the loading performance of a page, it can sometimes cause unexpected movement of page content. This is known as layout shift.&lt;/p&gt;
&lt;p&gt;Since visual stability is important to guarantee a smooth user experience, &lt;a href=&quot;https://web.dev/cls/&quot;&gt;Cumulative Layout Shift (CLS)&lt;/a&gt; measures how often those shifts happen and how disruptive they are.&lt;/p&gt;
&lt;p&gt;Layout shifts can be avoided by reserving space during page load for elements that are going to be dynamically loaded later. The browser can determine the space to be reserved if it knows the width and height of the elements. You can ensure this by specifying the &lt;code&gt;width&lt;/code&gt; and &lt;code&gt;height&lt;/code&gt; attributes of iframes or by setting a fixed size for static elements where the third-party embed will be loaded. For example, an iframe for a YouTube embed should have width and height specified as follows.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;iframe&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;https://www.youtube.com/embed/aKydtOXW8mI&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;560&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;315&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;iframe&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Popular embeds like YouTube, Google Maps, and Facebook provide the embed code with size attributes specified. However, there may be providers who do not include this. For example, this code snippet does not indicate the dimensions of the resulting embed.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;a&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;twitter-timeline&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;https://twitter.com/ChannelNewsAsia?ref_src=twsrc%5Etfw&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;data-tweet-limit&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;1&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Tweets by ChannelNewsAsia&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;a&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;script&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;https://platform.twitter.com/widgets.js&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;charset&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;utf-8&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token script&quot;&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;script&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;You can use DevTools to inspect the injected &lt;code&gt;iframe &lt;/code&gt;after this page is rendered. As seen in the following snippet, the height of the injected iframe is fixed while the width is specified in percentage.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;iframe&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;twitter-widget-0&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;scrolling&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;no&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;frameborder&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;allowtransparency&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;true&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;allowfullscreen&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;true&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;twitter-timeline twitter-timeline-rendered&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token special-attr&quot;&gt;&lt;span class=&quot;token attr-name&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;token value css language-css&quot;&gt;&lt;span class=&quot;token property&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; static&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;visibility&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; visible&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; inline-block&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 100%&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;border&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; none&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;max-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 1000px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;min-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 180px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;margin-top&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;margin-bottom&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;min-height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 200px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 6238.31px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;data-widget-id&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;profile:ChannelNewsAsia&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;Twitter Timeline&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;iframe&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;This information can be used to set the size of the containing element to ensure that the container does not expand on loading the feed and there is no layout shift. Following snippet may be used to fix the size of the embed included previously.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;style&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token style&quot;&gt;&lt;span class=&quot;token language-css&quot;&gt;&lt;br /&gt;    &lt;span class=&quot;token selector&quot;&gt;.twitterfeed&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; table-cell&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;  &lt;span class=&quot;token property&quot;&gt;vertical-align&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; top&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 100vw&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token selector&quot;&gt;.twitter-timeline&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 400px &lt;span class=&quot;token important&quot;&gt;!important&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;style&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;twitterfeed&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;       &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;a&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;twitter-timeline&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;https://twitter.com/ChannelNewsAsia?ref_src=twsrc%5Etfw&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;data-tweet-limit&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;1&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Tweets by ChannelNewsAsia&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;a&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;       &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;script&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;https://platform.twitter.com/widgets.js&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;charset&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;utf-8&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token script&quot;&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;script&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;h3 id=&quot;layout-shift-terminator&quot;&gt;Layout Shift Terminator &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/embed-best-practices/#layout-shift-terminator&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Since third-party embeds often omit the dimensions (width, height) for the final content they render, they can cause significant layout shifts on a page. This problem can be tricky to address without manually inspecting the final sizes using DevTools at a variety of different viewport sizes.&lt;/p&gt;
&lt;p&gt;Now there’s an automated tool, &lt;a href=&quot;https://googlechromelabs.github.io/layout-shift-terminator/&quot; rel=&quot;noopener&quot;&gt;Layout Shift Terminator&lt;/a&gt;, that can help you reduce layout shifts from popular embeds, such as from Twitter, Facebook, and other providers.&lt;/p&gt;
&lt;p&gt;Layout Shift Terminator:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Loads the embed client-side in an iframe.&lt;/li&gt;
&lt;li&gt;Resizes the iframe to various popular viewport sizes.&lt;/li&gt;
&lt;li&gt;For each popular viewport, captures the dimensions of the embed to later generate media queries and container queries.&lt;/li&gt;
&lt;li&gt;Sizes a min-height wrapper around the embed markup using media queries (and container queries) until the embed initializes (after which the min-height styles are removed).&lt;/li&gt;
&lt;li&gt;Generates an optimized embed snippet that can be copy/pasted where you would otherwise be including the embed in your page.&lt;/li&gt;
&lt;/ul&gt;
 &lt;img alt=&quot;Layour shift Terminal&quot; decoding=&quot;async&quot; height=&quot;740&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/lJrW6vxuf1G80XUmvXBT.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/lJrW6vxuf1G80XUmvXBT.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/lJrW6vxuf1G80XUmvXBT.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/lJrW6vxuf1G80XUmvXBT.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/lJrW6vxuf1G80XUmvXBT.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/lJrW6vxuf1G80XUmvXBT.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/lJrW6vxuf1G80XUmvXBT.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/lJrW6vxuf1G80XUmvXBT.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/lJrW6vxuf1G80XUmvXBT.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/lJrW6vxuf1G80XUmvXBT.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/lJrW6vxuf1G80XUmvXBT.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/lJrW6vxuf1G80XUmvXBT.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/lJrW6vxuf1G80XUmvXBT.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/lJrW6vxuf1G80XUmvXBT.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/lJrW6vxuf1G80XUmvXBT.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/lJrW6vxuf1G80XUmvXBT.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/lJrW6vxuf1G80XUmvXBT.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/1L2RBhCLSnXjCnSlevaDjy3vba73/lJrW6vxuf1G80XUmvXBT.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;p&gt;Try out the Layout Shift Terminator, and feel free to leave any feedback on &lt;a href=&quot;https://github.com/GoogleChromeLabs/layout-shift-terminator&quot; rel=&quot;noopener&quot;&gt;GitHub&lt;/a&gt;. The tool is in a beta state and aims to improve over time with further refinements.&lt;/p&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/embed-best-practices/#conclusion&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Third-party embeds can provide a lot of value to users, but as the number and size of embeds on a page increases, performance can suffer. That’s why it is necessary to measure, judge, and use appropriate loading strategies for embeds based on their position, relevance, and potential users&#39; needs.&lt;/p&gt;
</content>
    <author>
      <name>Leena Sohoni</name>
    </author><author>
      <name>Addy Osmani</name>
    </author><author>
      <name>Katie Hempenius</name>
    </author>
  </entry>
</feed>
