0Pricing
Web Performance Optimization & Lighthouse · 课时

新兴性能技术

了解新的及即将出现的 Web 性能技术、标准和最佳实践,保持优化方面的领先。

新兴性能技术 是 CoddyKit 上的免费 Web Performance Optimization & Lighthouse 课时。 这是第 3 节课,共 4 节。 你可以在下方免费阅读本课时的完整内容 — 然后在浏览器中使用内置代码编辑器和全天候 AI 导师进行实践。 这是 Web Performance Optimization & Lighthouse 学习路径的一部分,你的进度在网页和 CoddyKit 应用中同步。 Web Performance Optimization & Lighthouse 课程共包含 4 节课。

本课时的部分内容尚未翻译,以英文显示。

Diving into Future Perf Tech

The web is always evolving! To stay ahead, it's crucial to understand new performance technologies and standards.

This lesson explores exciting advancements that are shaping the future of web optimization.

The Edge of Innovation

Keeping up with emerging tech helps you:

  • Gain a competitive edge: Deliver faster, smoother experiences.
  • Improve user satisfaction: Meet rising user expectations.
  • Future-proof your skills: Adapt to new browser capabilities and best practices.

Interactions to Next Paint (INP)

Interactions to Next Paint (INP) is a new Core Web Vital that measures a page's responsiveness to user interactions.

It looks at the delay from when a user interacts (click, tap, keypress) until the browser visually updates the page.

A low INP score means a page is highly responsive.

Boosting INP Responsiveness

Improving INP often involves:

  • Minimizing main thread work: Avoid long-running JavaScript tasks.
  • Debouncing/Throttling: Limit how often event handlers run.
  • Using requestAnimationFrame: For visual updates, schedule them efficiently.

Example:

function handleScroll() { // Perform visual updates here } window.addEventListener('scroll', () => { requestAnimationFrame(handleScroll); });
function handleScroll() {
  // Perform visual updates here
}

window.addEventListener('scroll', () => {
  requestAnimationFrame(handleScroll);
});

Speeding Up with Early Hints

Early Hints (HTTP 103) is a new HTTP status code that allows servers to send hints about critical subresources (like CSS, JS, fonts) before the main HTML response is ready.

This lets browsers start fetching resources sooner, reducing perceived load time and improving First Contentful Paint.

Proactive Browsing with Speculation Rules

The Speculation Rules API empowers developers to tell the browser which pages the user is likely to visit next.

The browser can then prefetch or even prerender those pages in the background, making navigation feel instant when the user actually clicks.

It's a powerful tool for optimizing multi-page user journeys.

Speculation Rules in Action

You define speculation rules using a <script type="speculationrules"> tag in your HTML:

<script type="speculationrules"> { "prerender": [ { "source": "list", "urls": ["/next-page.html", "/product-details.html"] } ] } </script>

This tells the browser to prerender `/next-page.html` and `/product-details.html` when appropriate.

&lt;script type="speculationrules"&gt;
  {
    "prerender": [
      { "source": "list", "urls": ["/next-page.html", "/product-details.html"] }
    ]
  }
&lt;/script&gt;

WebAssembly for Raw Speed

WebAssembly (Wasm) is a low-level bytecode format that allows code written in languages like C++, Rust, or Go to run on the web at near-native speeds.

It's ideal for performance-critical tasks that JavaScript might struggle with, such as:

  • Heavy computations
  • Game engines
  • Video processing

Smooth UI with View Transitions

The View Transitions API helps create smooth, animated transitions between different states of a web page without complex manual JavaScript.

It takes a snapshot of the old view, updates the DOM, and then animates between the old and new snapshots.

This dramatically improves the perceived performance and user experience during single-page application (SPA) navigation.

Emerging Tech Knowledge

Which of the following emerging technologies helps browsers proactively fetch or render future pages, potentially making navigation feel instant?

Recap: Staying Ahead

We explored several key emerging web performance technologies:

  • INP: Measuring interaction responsiveness.
  • Early Hints: Faster resource loading.
  • Speculation Rules: Proactive page loading.
  • WebAssembly: Near-native performance for heavy tasks.
  • View Transitions: Smooth UI animations.

Staying informed about these advancements is key to building cutting-edge, high-performance web experiences.

常见问题解答

「新兴性能技术」课时是免费的吗?

是的 — 「新兴性能技术」的完整文本可在网页上免费阅读。要进行交互式练习(内置代码编辑器和全天候 AI 导师)并解锁 Web Performance Optimization & Lighthouse 课程的其余内容,请升级到 CoddyKit PRO。 Web Performance Optimization & Lighthouse 课程共包含 4 节课。

「新兴性能技术」这节课中我会学到什么?

了解新的及即将出现的 Web 性能技术、标准和最佳实践,保持优化方面的领先。 你通过在浏览器中直接运行的动手代码来练习 Web Performance Optimization & Lighthouse,全天候 AI 导师会在你学习这节课的过程中回答你的问题。

学习 Web Performance Optimization & Lighthouse 需要有经验吗?

无需任何先前经验。CoddyKit 上的 Web Performance Optimization & Lighthouse 课程适合初学者到高级学习者,你可以从这里开始或从头开始,按照自己的节奏学习。 这是第 3 节课,共 4 节。

「新兴性能技术」课时需要多长时间?

大多数 CoddyKit 课程大约需要 5–10 分钟。每节课都很精短且互动,所以你能稳步进步,并在网页和应用中从离开的地方继续。

我能在这节 Web Performance Optimization & Lighthouse 课中编写并运行代码吗?

能。每节 Web Performance Optimization & Lighthouse 课都包含内置代码编辑器,你可以在浏览器中直接编写并运行真实代码,并获得即时 AI 反馈 — 无需本地设置。

此课程中的所有课时

  1. 设置性能预算
  2. 预算监控与告警
  3. 新兴性能技术
  4. 向利益相关者传达性能信息
← 返回 Web Performance Optimization & Lighthouse