Largest Contentful Paint represents how quickly a web page's main content becomes visible after it starts loading. Specifically, LCP measures the time the page renders its largest content. The largest visible element may be a video, rich imagery or a text block.
A website with an LCP time below 2.5 seconds receives a “Good” rating. A time between 2.5 and 4 seconds is rated as “Needs Improvement,” while an LCP time greater than or equal to 4 seconds is a “Poor” score. There are many ways to improve the loading speed of a webpage, typically through deleting unnecessary code or minimising the amount of data you’re trying to load.
You may need to employ several approaches before you get the desired results, as you’ll need to tailor your approach to your page. Some common ways of reducing your LCP time include:
- Cascading Style Sheets or CSS, tell a browser what a website should look like. Sometimes, CSS data is attached to a page but not used, typically because the earlier data is overwritten. Tools such as Chrome DevTools can find unused CSS rules that can be removed.
- Not everything on the page must be loaded simultaneously. If you can delay the non-critical CSS content, you can create a page that loads the essentials first while the rest loads in the background.
- Even critical styles that can’t be deferred can be improved by reducing their size. Minification removes unnecessary characters and spaces without changing the way your browser reads them.