惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Blog of Author Tim Ferriss
Microsoft Azure Blog
Microsoft Azure Blog
S
SegmentFault 最新的问题
Schneier on Security
Schneier on Security
W
WeLiveSecurity
Webroot Blog
Webroot Blog
T
Threatpost
量子位
大猫的无限游戏
大猫的无限游戏
C
Cisco Blogs
腾讯CDC
N
News | PayPal Newsroom
T
Troy Hunt's Blog
T
Tailwind CSS Blog
Latest news
Latest news
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
The Register - Security
The Register - Security
Know Your Adversary
Know Your Adversary
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Engineering at Meta
Engineering at Meta
SecWiki News
SecWiki News
MyScale Blog
MyScale Blog
GbyAI
GbyAI
Application and Cybersecurity Blog
Application and Cybersecurity Blog
A
Arctic Wolf
The GitHub Blog
The GitHub Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Help Net Security
Help Net Security
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
有赞技术团队
有赞技术团队
NISL@THU
NISL@THU
L
LINUX DO - 最新话题
雷峰网
雷峰网
P
Privacy International News Feed
Spread Privacy
Spread Privacy
Attack and Defense Labs
Attack and Defense Labs
N
News and Events Feed by Topic
月光博客
月光博客
V
V2EX
H
Help Net Security
博客园 - 三生石上(FineUI控件)
U
Unit 42
B
Blog
PCI Perspectives
PCI Perspectives
G
GRAHAM CLULEY
Stack Overflow Blog
Stack Overflow Blog
P
Proofpoint News Feed
T
Threat Research - Cisco Blogs
Last Week in AI
Last Week in AI

CloudCannon Blog

Building with AI: Git-based vs headless vs traditional CMS CloudCannon + Astro: performance meets powerful content management Introducing the Astro Component Starter Introducing Jetstream — built on the Astro Component Starter Why we switched to the system font stack Redesigning CloudCannon’s docs with Diátaxis, Lume, and Pagefind Make content editing more visual: upgraded Editable Regions How Configuration Mode makes building editing interfaces easy Your hosting just got an upgrade (and a price cut) Custom testing domains for professional branding Keep your content consistent with input validation Managing multilingual content in CloudCannon Simplify team publishing with conflict resolution and domain tools Open Beta: Publishing Conflict Resolution Getting started with CloudCannon and Astro: Bookshop, components, and live editing Welcome to the CloudCannon Community! Omnichannel delivery is just marketing spin from API-based CMS companies Getting started with CloudCannon and Astro: Snippets and Collections Managing digital assets in CloudCannon: a guide to smart asset storage Understanding CloudCannon's branching workflows and Projects: a complete guide What is a static website? CloudCannon’s 2024 wrapped Getting started with CloudCannon and Astro: WYSIWYG blogging Jamstack vs. WordPress: reasons to make the change The top five static site generators for 2025 (and when to use them!) Free Jekyll themes for 2025: ten great community options Eleventy (11ty) vs. Hugo How to set up WYSIWYG editing with MkDocs Material The rise of static-first websites: why major brands are making the switch Watching your Core Web Vitals on Jamstack Understanding the difference between static, dynamic, and hybrid websites Looking for an alternative to Netlify CMS or Decap CMS? Designing components for your website editors: a CloudCannon case study Does my website look big in this? Six tips to lower your page weight Content is sacred — so own your revision history Streamlined Headless Mode, Unified Configuration, and live data editing What is a headless CMS? Looking for a TinaCMS or Tina Cloud alternative? The ultimate guide to Hugo Sections Coming soon: Live config editing and data reloading Faster publishing workflows out now! Why information architecture matters for your website Website UX vs SEO: picking your battles Easily manage your multilingual Astro site in CloudCannon How you can optimize publishing workflows for your content team How you can optimize your CMS for SEO success How you can optimize your Content Editor for long-form articles How you can optimize your Visual Editor for page building Secure, swift, and stable: static sites for the financial sector Enhanced flexibility for teams with Custom Permissions Building static sites that scale The Inaugural 11ty International Symposium on Making Web Sites Real Good How to manage hundreds of connected websites with a Git-based headless CMS How we’re building CloudCannon for accessibility CloudCannon’s new editing improvements are here! Open Beta | New ways to collaborate on editing your websites Top 11 free Eleventy themes for 2024 Top 10 free Astro themes to use in 2024 Why choose a Git-based headless CMS over a monolithic DXP in 2024? Learning web development: a self-guided roadmap Partner Site of the Month: Blüthner Piano Centre, by Winteractive CloudCannon’s 2023 wrapup Let’s create a microblog with visual editing using Bookshop and Eleventy Update and visualize your branches with CloudCannon Projects What is a Git-based CMS and why you should use one CloudCannon secures SOC 2 certification The complete guide to growing your web development agency Automatically optimize your images with Eleventy Image and CloudCannon Share components and syndicate content with Site Mounting Partner Site of the Month: Cru Uncorked, by Ed Meehan New web component for responsive HTML tables Wrapping up HugoConf 2023 Partner Site of the Month: Van Dillen Antieke Bouwmaterialen, by Fulldev How to become a freelance web developer: a comprehensive guide Q3 2023: CloudCannon features and improvements 22 ways to deliver more value to your web development clients Partner Site of the Month: DC Gay Flag Football League, by Ed Cupaioli A new way to configure your CloudCannon sites CloudCannon — the official CMS partner of Eleventy Full CloudCannon support for Nuxt static sites Partner Site of the Month: Stadium Bike, by Insight Creative, Inc. HugoConf 2023, brought to you by CloudCannon DAM Support for Cloudflare R2 and DigitalOcean Spaces Eleventy (11ty) vs. Gatsby in 2023 – which SSG is best for you? How CloudCannon’s live editing works with Astro and Bookshop Partner Site of the Month: Fiducian, by Croissant & Baguette Eleventy (11ty) vs. Astro How to customize CloudCannon’s Client Sharing interface Let anyone, anywhere, edit your CloudCannon sites Top 23 free Astro themes for building out-of-this-world static sites in 2023 How Jampack optimizes our Eleventy website and improves performance Astro vs. Next.js CloudCannon.com is now built with Eleventy! Out-of-this-world support for all Astro users Introducing the CloudCannon Partner Program Full CloudCannon support for Gatsby Top 10 Free SvelteKit Themes for Building Lighting-Fast Static Sites in 2023 Enhanced CloudCannon support for Next.js users Upcoming CloudCannon Interface improvements (Open Beta) Creating sites, the Jamstack way
The eternal balancing act: load time vs. delay time
2024-10-17 · via CloudCannon Blog

As frontend developers, we're constantly juggling various factors to create fast, responsive, and engaging web experiences. Two critical aspects of this balancing act are load time and delay time, especially when it comes to Google's Lighthouse scores and the Largest Contentful Paint (LCP) metric. In this article, we'll explore the tension between these two factors and how to optimize them for better performance.

Understanding load time vs. delay time Direct link to this section

Before diving into the specifics, let's clarify what we mean by load time and delay time:

  • Load time: The time it takes for all resources on a page to load completely.
  • Delay time: The time spent on processing or optimizing resources before they're presented to the user.

Both factors significantly impact user experience, but in different ways. A faster load time generally leads to a quicker initial render, while strategic delays can result in a more optimized and smooth experience once the content is displayed.

Google's Lighthouse scores Direct link to this section

Google's Lighthouse is an open-source tool for measuring web page quality, including performance. It provides scores and metrics that help developers identify areas for improvement. Key performance metrics measured by Lighthouse include First Contentful Paint (FCP), Time to Interactive (TTI), Total Blocking Time (TBT), Cumulative Layout Shift (CLS), and our focus today, Largest Contentful Paint (LCP).

Largest Contentful Paint (LCP) Direct link to this section

LCP is a crucial metric that measures the render time of the largest content element visible within the viewport. It's important because it represents when the main content of a page is likely loaded and visible to the user. Google considers an LCP of 2.5 seconds or less as "good."

The tension: load time vs. delay time Direct link to this section

Here's where the balancing act comes into play. To improve LCP, we might be tempted to load all resources, including all JavaScript, as quickly as possible. However, this approach can lead to:

  

Increased network congestion. Flooding the network with requests for multiple resources simultaneously can create bottlenecks.

  

Higher server load. Rapid, concurrent requests can strain server resources, potentially slowing down response times.

  

Potential layout shifts. As resources load at different speeds, the page layout may shift, leading to a poor user experience and negatively impacting Cumulative Layout Shift (CLS).

  

Wasted resources. Loading non-critical resources early can waste bandwidth and processing power, especially on mobile devices.


On the other hand, strategically delaying the load of certain resources can have some benefits:

  

Improve overall page performance. By prioritizing critical content, the perceived load time can be significantly reduced.

  

Reduce bandwidth usage. Lazy loading and on-demand resource fetching can decrease the initial page payload size.

  

Provide a smoother user experience. Gradually loading content can create a more fluid feel as the user interacts with the page.

  

Optimize resource usage. Delaying non-critical resources allows the browser to focus on rendering the most important content first.

Strategies for balancing load and delay Direct link to this section

The trouble is, while strategic delays can help, excessive delays can negatively impact LCP and other metrics. To find the right balance, consider these strategies:

Prioritize above-the-fold content: Load critical, visible content as quickly as possible to improve perceived performance. For example, you might inline critical CSS and defer non-essential scripts, or split up larger JavaScript bundles into smaller chunks, loading only what's necessary for the initial render. (We use Jampack to help with this process on cloudcannon.com, and the new <the-fold></the-fold> mark is really helpful to determine where to draw the line.)

Implement intelligent lazy loading: Use techniques like Intersection Observer to load images and other media only when they're about to enter the viewport. Your images, too, should be using next-gen image formats, proper sizing, and compression. (A digital asset management system like imgix can help here!)

Leverage browser hints: Use preload, prefetch, and preconnect directives to guide the browser in resource prioritization.

Implement progressive loading: Use techniques like skeleton screens or low-quality image placeholders to give users immediate visual feedback while the full content loads.

It should go without saying, but it’s important to schedule regular site testing using tools like Lighthouse and WebPageTest. Your site will grow and change as you add analytics tools and scripts for extra functionality — don’t forget to assess the impact of each addition.

Case study time! Direct link to this section

Let’s look at an example. If external scripts like Google Analytics are necessary to your site, but they delay your largest contentful paint, what should you do?

Well, we can start by working out what’s most important. All else being equal, we have two clear paths:

  1. Defer Google Analytics and other tracking scripts slightly later in the page load, with the downside that we will miss any user action within that deferment window. It’s likely that the main data we would lose here is early bounces from the site, where a user closes the browser tab without taking any action.

    As to how long should we defer — 500ms? 1s? — the best bet is usually to incrementally increase the time until your score increases, and not a moment longer. (It's fiddly, yes. We called it a balancing act for a reason!)

  2. Keep our analytics scripts loading as early as possible, and accept the LCP loss. We’d get full data on our site users, but we might also take a ranking hit if our scripts drastically affect our page speed score.

We’d lean towards the first option: accepting the slight analytics data loss (while noting that change in our monthly analytics reports, of course).

Why? Because losing data on early bounced users is a known factor — and in most cases SEO experts compare bounces on a rolling average. If we can explain the point at which the data shifted, we’ll simply set a new baseline for future comparisons.

And while the degree to which LCP affects our site’s PageSpeed or Lighthouse score isn’t completely unknown, the results are more opaque. In general, we'd rather deliver a site that has no negative speed or performance factors affecting its ranking.

Your mileage may vary, of course. If the LCP delay is minor, and those early analytics are particularly important to you, your balancing act will be different to ours!

If you'd prefer to dig into things more deeply yourself, check out Arjen Karel's great article on how to defer or schedule JavaScript for some helpful advice.

Being content on that balance beam Direct link to this section

Balancing load time and delay time is crucial for optimizing web performance, particularly for metrics like Largest Contentful Paint. But understanding the tension between the factors that affect a site’s LCP is only the first step.

It’s equally important for all site owners — developers and editors — to be on the same page about what the most important parts of each page of your site actually are.

When everyone agrees on what’s most important, it becomes easier to prioritize the loading of crucial elements. Designers can create layouts that showcase priority content; writers can focus on crafting engaging short-form content, and all stakeholders can make informed decisions about features and content that align with both user experience and business objectives.