Search⌘ K

Astro Islands

Explore how Astro Islands enhance website performance by deferring JavaScript loading to interactive components only. Understand strategies for improving Core Web Vitals and SEO with efficient resource allocation and parallel loading in Astro projects.

Astro optimizes websites using Astro Islands to achieve perfect performance scores. Performance issues on websites often arise from the amount of JavaScript loaded and executed on the page. To address this, Astro loads JavaScript on demand for individual components. This not only improves performance scores but also positively impacts SEO because page speed directly affects SEO. This is because the user experience is affected, among many other things, by load time.

What is an Astro Island?

Astro Islands are interactive components that require JavaScript code to function. The loading of JavaScript for these islands can be deferred using a special Astro-specific attribute.

Only Astro Islands load JavaScript
Only Astro Islands load JavaScript

A web application can be divided into several distinct components. In a real-world application, some components are purely presentational and don’t require any JavaScript code because they lack interactivity. This is especially true for static blogs, where most ...