Перейти до основного вмісту
← 📄 HTML & the platform·Модуль A7 · Урок 12
ЗавданняOptimize the slow page. Add: defer to all scripts, preconnect to https://cdn.example.com (crossorigin), preload /hero.webp as='image' fetchpriority='high', preload /inter.woff2 as='font' type='font/woff2' crossorigin, set loading='lazy' on the below-fold img, set width+height on both imgs, add <meta name='view-transition' content='same-origin'>.

Завершення модуля: зменшіть 800 мс на повільній сторінці

200 XP14 min
Теорія

Putting A7 together

The starter HTML is a SLOW page: blocking scripts, no resource hints, eager images, no compression headers (out of our control), no preconnect. LCP measured: ~2.4s.

Goal: get LCP under 1.6s by applying every A7 technique:

  1. Make all scripts non-blocking (defer or async).
  2. Preconnect to external origins you'll fetch from.
  3. Preload the LCP image with fetchpriority="high".
  4. Preload the hero font.
  5. Lazy-load below-fold images.
  6. Set width/height on every image (CLS).
  7. Add view-transition meta for SPA-like nav.
🔒

Зареєструйся щоб кодувати

Теорія відкрита всім. Інтерактивний редактор, живий перегляд і перевірка відкриваються з 7-денним безкоштовним trial — потрібна картка, скасування у будь-який час.

Реєстрація — безкоштовний trial →

Перші 10 уроків у кожному треку — безкоштовні. Картка не потрібна.

← НазадНаступний урок →

Отримуй одну пораду з Python чи вебу — щодня поштою

Коротко, без води, без спаму. Відписка — в один клік.