Zmniejsz rozmiar zawartości części strony widocznej na ekranie
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Ta reguła się uruchamia, gdy PageSpeed Insights wykryje, że wygeneroqanie częśći strony widocznej na ekranie wymaga dodatkowych transferów sieciowych w obie strony.
Opis
Jeśli wymagana ilość danych przekroczy początkowy okres przeciążenia (zwykle 14,6 kB po skompresowaniu), konieczna będzie dodatkowa wymiana danych między serwerem a przeglądarką użytkownika. W przypadku sieci o długim czasie oczekiwania, na przykład sieci komórkowych, może to powodować poważne opóźnienia wczytywania stron.
Rekomendacje
Aby strony wczytywały się szybciej, ogranicz rozmiar danych (znaczniki HTML, obrazy, CSS, JavaScript) wymaganych do wyrenderowania części strony widocznej na ekranie.
Możesz to zrobić na kilka sposobów:
Zaplanuj taką strukturę kodu HTML, by najważniejsza część strony – widoczna na ekranie – wczytywała się najpierw
W pierwszej kolejności wczytuj główną zawartość strony. Utwórz taką stronę, aby wstępna odpowiedź serwera wysyłała dane niezbędne do natychmiastowego wyrenderowania krytycznej części strony i odroczenia pozostałych.
Może to oznaczać, że musisz podzielić kod CSS na 2 części: część wbudowaną odpowiedzialną za stylizację części strony widocznej na ekranie oraz część z możliwością odroczenia.
Popatrz na poniższe przykłady możliwych zmian struktury witryny, by wczytywała się szybciej:
Jeżeli HTML wczytuje zewnętrzne widżety przed główną zawartością, zmień kolejność tak, by to główna zawartość wczytywała się najpierw.
Jeżeli układ witryny jest oparty na dwóch kolumnach, z paskiem bocznym do nawigacji i artykułem, a HTML wczytuje najpierw pasek, a potem artykuł, pomyśl o nadaniu priorytetu artykułowi.
Zmniejsz ilość danych wykorzystywanych przez zasoby
Po przeprojektowaniu witryny pod kątem poprawnego wyświetlania na różnych urządzeniach i najpierw wczytuj najważniejsze treści, aby ograniczyć ilość danych wymaganych do wyrenderowania strony, zastosuj następujące metody:
Zmniejsz zasoby: Możesz zmniejszyć rozmiar zasobów HTML, CSS i JavaScript, usuwając zbędne odstępy i komentarze. Narzędzia do zmiany nazw zmiennych w zasobach mogą pomóc w dalszej optymalizacji.
[null,null,["Ostatnia aktualizacja: 2025-07-25 UTC."],[[["\u003cp\u003eThis PageSpeed Insights rule is triggered when additional network round trips are needed to render above-the-fold content.\u003c/p\u003e\n"],["\u003cp\u003eTo optimize, prioritize loading critical above-the-fold content first by restructuring HTML and reducing resource sizes.\u003c/p\u003e\n"],["\u003cp\u003eReduce data size by minifying resources, using CSS instead of images where possible, and enabling compression.\u003c/p\u003e\n"],["\u003cp\u003eThis documentation refers to a deprecated version of PageSpeed Insights API; the latest version is 5.\u003c/p\u003e\n"]]],["The core issue addressed is the delay in page loading caused by excessive data transfer required to render above-the-fold content. Key actions include structuring HTML to prioritize critical content, loading it first, and deferring non-essential parts. Recommendations involve reducing data size by minifying resources (HTML, CSS, JavaScript), using CSS instead of images when feasible, and enabling compression. The document advises optimizing content loading to avoid additional network round trips and improve page speed.\n"],null,["# Reduce the size of the above-the-fold content\n\n| **Deprecated** . This page was written for version 4 of the PageSpeed Insights API, which is deprecated and will be shut down in May 2019. [Version 5](/speed/docs/insights/v5/get-started) is the latest and provides both real-world data from the Chrome User Experience Report and lab data from Lighthouse.\n\n\nThis rule triggers when PageSpeed Insights detects that additional network round trips are required to render the above the fold content of the page.\n\n### Overview\n\n\nIf the amount of data required exceeds the initial congestion window (typically 14.6kB compressed), it will require additional round trips between your server and the user's browser. For users on networks with high latencies such as mobile networks this can cause significant delays to page loading.\n\n### Recommendations\n\nTo make pages load faster, limit the size of the data (HTML markup, images, CSS, JavaScript) that is needed to render the above-the-fold content of your page. There are several ways to do this:\n\n- [Structure your HTML to load the critical, above-the-fold content first](#structure)\n- [Reduce the amount of data used by your resources](#reduce)\n\n#### Structure your HTML to load the critical, above-the-fold content first\n\n\nLoad the main content of your page first. Structure your page so the initial response from your server sends the data necessary to render the critical part of the page immediately and defer the rest.\nThis may mean that you must split your CSS into two parts: an inline part that is responsible for styling the ATF portion of the content, and the part that can be deferred.\n\n\nConsider the following examples of how a site could be restructured to load faster:\n\n- If your HTML loads third-party widgets before it loads the main content, change the order to load the main content first.\n- If your site uses a two-column design with a navigation sidebar and an article, but your HTML loads the sidebar before the article, consider loading the article first.\n\n#### Reduce the amount of data used by your resources\n\nOnce your site has been redesigned to work well across multiple devices and load the critical content first, use the following techniques to reduce the amount of data required to render your page:\n\n- [Minify Resources](/speed/docs/insights/MinifyResources): HTML, CSS, and JavaScript can be minified by removing unnecessary whitespace and comments. Further optimizations may be possible through the use of tools which rename variable names in your resources.\n- Consider [using CSS instead of images](https://www.google.com/search?q=css+instead+of+images) where possible.\n- [Enable Compression](/speed/docs/insights/EnableCompression)\n\nFeedback\n--------\n\nWas this page helpful? \nYes Great! Thank you for the feedback. If you have a specific, answerable question about using PageSpeed Insights, ask the question in English on [Stack\n| Overflow](https://stackoverflow.com/questions/tagged/pagespeed-insights). For general questions, feedback, and discussion, start a thread in the [mailing list](https://groups.google.com/forum/#!forum/pagespeed-insights-discuss).\nNo Sorry to hear that. If you have a specific, answerable question about using PageSpeed Insights, ask the question in English on [Stack\n| Overflow](https://stackoverflow.com/questions/tagged/pagespeed-insights). For general questions, feedback, and discussion, start a thread in the [mailing list](https://groups.google.com/forum/#!forum/pagespeed-insights-discuss)."]]