March 2010 April 2010 May 2010 June 2010 July 2010
August 2010
September 2010 October 2010
November 2010
December 2010 January 2011 February 2011 March 2011 April 2011 May 2011 June 2011 July 2011 August 2011 September 2011 October 2011 November 2011 December 2011 January 2012 February 2012 March 2012 April 2012 May 2012 June 2012 July 2012 August 2012 September 2012 October 2012 November 2012 December 2012 January 2013 February 2013 March 2013 April 2013 May 2013 June 2013 July 2013 August 2013 September 2013 October 2013 November 2013 December 2013 January 2014 February 2014 March 2014 April 2014 May 2014 June 2014 July 2014 August 2014 September 2014 October 2014 November 2014 December 2014 January 2015 February 2015 March 2015 April 2015 May 2015 June 2015 July 2015 August 2015 September 2015 October 2015 November 2015 December 2015 January 2016 February 2016 March 2016 April 2016 May 2016 June 2016 July 2016 August 2016 September 2016 October 2016 November 2016 December 2016 January 2017 February 2017 March 2017 April 2017 May 2017 June 2017 July 2017 August 2017 September 2017 October 2017 November 2017 December 2017 January 2018 February 2018 March 2018 April 2018 May 2018 June 2018 July 2018 August 2018 September 2018 October 2018 November 2018 December 2018 January 2019 February 2019 March 2019 April 2019 May 2019 June 2019 July 2019 August 2019 September 2019 October 2019 November 2019 December 2019 January 2020 February 2020 March 2020 April 2020 May 2020 June 2020 July 2020 August 2020 September 2020 October 2020 November 2020 December 2020 January 2021 February 2021 March 2021 April 2021 May 2021 June 2021 July 2021 August 2021 September 2021 October 2021 November 2021 December 2021 January 2022 February 2022 March 2022 April 2022 May 2022 June 2022 July 2022 August 2022 September 2022 October 2022 November 2022 December 2022 January 2023 February 2023 March 2023 April 2023 May 2023 June 2023 July 2023 August 2023 September 2023 October 2023 November 2023 December 2023 January 2024 February 2024 March 2024 April 2024 May 2024 June 2024 July 2024 August 2024 September 2024
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
25
26
27
28
29
30
News Every Day |

Optimizing Largest Contentful Paint: 5 tips for a faster website by DebugBear

Page speed is important for a good user experience.

Google’s Core Web Vitals metrics also can impact organic search rankings.

This article will review some new and less well-known approaches to make your website faster.

What is Largest Contentful Paint?

Largest Contentful Paint (LCP) measures how soon visitors can see the main content after opening a webpage.

LCP is one of three Core Web Vitals metrics used to assess a webpage’s performance. The other Core Web Vitals are:

Google defines thresholds for each metric that websites need to hit to get a ranking boost.

Here are a few techniques you can use to improve your LCP scores.

1. Add speculation rules to your website

Hopefully, many of your visitors navigate around your website to explore all your business has to offer.

Speculation rules are a new browser feature that makes it easy to optimize these later pageviews. They allow websites to proactively load other pages on your website before the visitor opens them.

For example, after a visitor reads a blog post they might check out your homepage next, or go to a signup page. Those navigations can be instant if these pages are pre-rendered using speculation rules. That means your LCP score will be below 100 milliseconds.

Adding speculation rules to your website is easy. Just add a script tag like this to your website:

<script type="speculationrules">
 {
   "prerender": [
     {
       "urls": ["/", "/signup"]
     }
   ]
 }
</script>

2. Optimize LCP with real user data

There are a lot of website performance testing tools, including PageSpeed Insights and DebugBear’s free website speed test.

These tools run what’s called a lab test: the page is opened in a controlled testing environment where a performance measurement is taken.

However, sometimes the lab-based LCP values won’t match real user experiences. This can happen for a number of reasons, including:

  • Lab tests might hit a cache while most users need data to be regenerated.
  • Many real users are logged in and experience slower page loads.
  • Real users have different network and device speeds from the lab environment.
  • Visitors have a different device size from the lab test.

Real website visitors also have diverse experiences. Optimizations that work well for one visitor segment might not work well for another.

Here a real user monitoring (RUM) tool can help you better understand what’s happening on your website and which optimizations will have the biggest impact.

For example, RUM data can tell you what page elements are responsible for the LCP rendering milestones. This will vary between visitors, and knowing what LCP elements need to be optimized provides the foundation for a good LCP score.

When Google reports real user page speed it looks at the 75th percentile value. For example, if your LCP score is 3 seconds, that means that 75% of your users waited less than 3 seconds for the main page content, and 25% waited longer than that.

However, this is just an aggregate value. Some visitors might wait 5 seconds or more – and these people will likely bounce.

Real user monitoring can give you a more detailed breakdown of how different visitors experience your website. For example, by showing a histogram for each of the Core Web Vitals metrics. You can also look at specific visitor experiences to optimize them.

We’ve already seen that visitor devices have a big impact on your website’s LCP score.

Depending on the screen size of each website visitor, different content will be visible above the fold, and images will be displayed at different sizes.

The LCP image can vary between visitors – even on the same page. 

Lab tests always use the same screen size, but real user data captures the variety of devices used to access your website.

Real user monitoring data can therefore show you exactly what images on your website are loading slowly most often and need to be optimized.

3. Identify slow LCP subparts

Four things need to happen to display an LCP image on your website. These LCP subparts are:

  • Time to First Byte: How quickly does the server respond to the initial document request?
  • Resource Load Delay: How quickly does the browser discover the LCP image?
  • Resource Load Time: How long does it take to download the LCP image?
  • Render Delay: Does the LCP image show up immediately after loading or is there a delay?

Many page speed tools are built on Google’s free Lighthouse test, including PageSpeed Insights. Here, in the Diagnostics section, you can find details on the Largest Contentful Paint element. Below the element preview Lighthouse shows the LCP subpart breakdown.

Depending on what LCP component contributes the most to your overall score, different optimizations will make sense for your website.

For example, if Load Time is high, that would suggest that you have a large image on your website that takes a long time to download. In that case, resizing the image or using a modern image format like WebP would be a promising optimization.

However, Google recently published an article on common misconceptions about how to optimize the LCP metric that found:

  • Load Time often isn’t a big factor.
  • Other subparts like TTFB and Load Delay play a bigger role in improving LCP.

Make sure your server responds quickly when the client requests the HTML. In the HTML, directly reference the LCP image to ensure there is no delay between loading the HTML and discovering the image.

4. Preload and prioritize the LCP image

When the browser loads your website, the HTML code will reference a large number of additional resources (e.g., stylesheets, scripts, images). The browser needs to assign a priority to each of these requests.

Images are generally considered low priority, as they don’t block other content from appearing on the website. However, the main image that’s responsible for the LCP should be loaded early.

A request waterfall visualization can surface these issues. In this example, we see that the LCP image only starts loading late and initially has a low priority. Then, when the browser realizes that the image is in the viewport, the priority changes to high.

The LCP score can be optimized with the fetchpriority attribute. This HTML attribute tells the browser if a given resource is important, and can simply be added to an img tag like this:

<img src="photo.jpg" fetchpriority="high">

With this attribute in place, browsers can start loading the image as soon as possible and prioritize downloading it over other resources on the page.

If the image isn’t referenced directly at the top of the HTML document, a preload resource hint can also be used to start loading the image early.

That way, when the image is added to the page, the image shows up right away rather than only starting to load then.

5. Monitor page speed continuously

Running one-off tests on your website is a great way to start optimizing your performance.

But are those optimizations actually working for real users? 

And what happens if there’s an unrelated change that makes performance worse? 

In that case you need a website monitoring tool like DebugBear.

A performance monitoring tool continuously tests your website and your competitors’ websites. You’ll get:

  • Detailed reports with suggestions to improve your page speed.
  • Alerted if your website performance gets worse.

DebugBear includes three types of data:

  • Scheduled lab-based tests.
  • Google CrUX data (which impacts SEO).
  • Real user monitoring.

Having this insight into your website provides the foundation your team needs to pass Google’s Core Web Vitals assessment. 

Start your free 14-day trial today.

WTA

Касаткина проиграла Хаддад-Майе в финале турнира WTA 500 в Сеуле

Los Alamitos horse racing consensus picks for Saturday, September 21, 2024

Mum leaves people raging over VERY unique baby moniker, as they remind her she’s ‘naming kids, not Hungry Hippos’

Elle King shares major life update after opening up about 'toxic' relationship with dad Rob Schneider

Morning Briefing: Mets Keep Ground in Wild Card Race Despite Loss

Ria.city






Read also

Dillian Whyte Didn’t Hesitate When Asked About Anthony Joshua’s Future After Dubois Knockout

Morning Briefing: Mets Own Second Wild Card Spot

Buying a home just got more affordable for the first time in 4 years

News, articles, comments, with a minute-by-minute update, now on Today24.pro

News Every Day

Los Alamitos horse racing consensus picks for Saturday, September 21, 2024

Today24.pro — latest news 24/7. You can add your news instantly now — here


News Every Day

Los Alamitos horse racing consensus picks for Saturday, September 21, 2024



Sports today


Новости тенниса
Бобби Риггс

51 год назад прошла «Битва полов» между Билли Джин Кинг и Бобби Риггсом



Спорт в России и мире
Москва

На матче "ЦСКА-Динамо" родилась новая семья



All sports news today





Sports in Russia today

Москва

На матче "ЦСКА-Динамо" родилась новая семья


Новости России

Game News

Авторы Warhammer 40,000: Space Marine 2 противопоставляют себя современной западной индустрии


Russian.city


Филипп Киркоров

Суд взыскал с Киркорова 90 тысяч рублей в пользу Успенской


Губернаторы России
Владимир Путин

Путин и глава Туркменистана обсудили подготовку к саммитам СНГ и БРИКС


В Подмосковье сотрудники Росгвардии задержали подозреваемого в убийстве

Ефимов: с 2010 года образовательные учреждения Москвы получили более 4 млн кв. м недвижимости

Бутик-отели «Де Арт 13» – уют и дизайн в сердце Москвы

Наш российский Голливуд


В Клину сотрудники Росгвардии приняли участие в экологической акции

Концерт «Прекрасный клавесин» для дошкольников прошёл в Пскове

Премьера трека от финалиста шоу “Голос” Сергея АРУТЮНОВА “Тучи” состоялась на Русском Радио. Выпуск трека приурочен к выходу трибьют-альбома группы “Иванушки International” в честь их 30-летия

Как опухший утопленник: Джиган обвинил Ольгу Самойлову в своей не фотогеничности


Медведев в составе сборной Европы завоевал Кубок Лейвера

Титулы Самсоновой и Хромачёвой, неудача Касаткиной и прорыв Качмазова: как российские теннисисты проводят турниры в Азии

Вероника Кудерметова победила Викторию Томову и пробилась в полуфинал WTA-500 в Сеуле

Касаткина проиграла Хаддад-Майе в финале турнира WTA 500 в Сеуле



На матче "ЦСКА-Динамо" родилась новая семья

В Подмосковье сотрудники Росгвардии задержали подозреваемого в убийстве

Бутик-отели «Де Арт 13» – уют и дизайн в сердце Москвы

Свыше 6,5 тысячи жителей Москвы и Московской области получили справки о статусе предпенсионера в клиентских службах регионального Отделения СФР и МФЦ


Центр восточной медицины в Петербурге

Суд арестовал имущество КЭМЗ по делу о хищении при строительстве «Газпром Арена»

Титулы Самсоновой и Хромачёвой, неудача Касаткиной и прорыв Качмазова: как российские теннисисты проводят турниры в Азии

В регионе впервые провели Открытый Кубок Тамбовской области по гольфу


1114 кг мусора и вторсырья за час: новый рекорд акции «Живи Экологично»

Полиция перекрыла канал поставки сильнодействующих препаратов в Петербурге и Нальчике

В Жуковском 27 сентября состоится встреча администрации с местными жителями

Абрамович ответил на новости о продаже московского музея "Гараж"



Путин в России и мире






Персональные новости Russian.city
Филипп Киркоров

Суд взыскал 90 тысяч рублей с Киркорова по иску Успенской



News Every Day

Mum leaves people raging over VERY unique baby moniker, as they remind her she’s ‘naming kids, not Hungry Hippos’




Friends of Today24

Музыкальные новости

Персональные новости