Navigation

ThemeWare® Knowledge Base

PageSpeed Insights

Explanations of PageSpeed Insights metrics such as First Contentful Paint, Speed Index, Largest Contentful Paint and Total Blocking Time.

Metrics

First Contentful Paint marks the time at which the first text or image is painted. Learn more.

Speed Index shows how quickly the contents of a page are visibly populated. Learn more.

Largest Contentful Paint marks the time at which the largest text or image is painted. Learn more

Time to Interactive is the amount of time it takes for the page to become fully interactive. Learn more.

Sum of all time periods (in milliseconds) between FCP and Time to Interactive in which the task length exceeded 50 ms. Learn more

Cumulative Layout Shift measures the movement of visible elements within the viewport. Learn more

Opportunities

These suggestions may help your page load faster. They do not directly affect the performance score.

Image formats like WebP and AVIF often provide better compression than PNG or JPEG, which means faster downloads and less data consumption. Learn more

Note:

Product images are particularly relevant here. Neither Shopware nor ThemeWare® has any influence on the image formats of individually uploaded images. Optimise your images before you upload them to the media management.

Tip: A "lazy loading" extension from the Shopware Store can help as well.

Serve images that are appropriately sized to save mobile data and improve the load time. Learn more.

Note:

Unfortunately, this point is not easy to solve, because many images in the storefront are fluid and adapt to the available width of their element.

Tip: A "lazy loading" extension from the Shopware Store can help as well.

Keep the server response time for the main document as short as possible, because all other requests depend on it. Learn more.

Note:

This point is closely linked to the server performance.

You can reduce unused JavaScript and defer loading scripts until they are required to decrease the data consumed by network activity. Learn more

Note:

Shopware generates one JS file with the entire JS code of the storefront (Shopware, theme and all apps or plugins).

ThemeWare® was developed from the ground up so that only the most necessary code is compiled.

You can reduce unused rules from stylesheets and defer CSS that is not used for above-the-fold content to decrease the data consumed by network activity. Learn more

Note:

Shopware generates one CSS file with the entire CSS code of the storefront (Shopware, theme and all apps or plugins).

ThemeWare® was developed from the ground up so that only the most necessary code is compiled. In addition, you can disable optional CSS code in the tab "Others".

Resources are blocking the first paint of your page. Consider delivering critical JS and CSS inline and deferring all non-critical JS and styles. Learn more.

Note:

Shopware generates one JS file and one CSS file with the entire JS or CSS code of the storefront (Shopware, theme and all extensions).

ThemeWare® was developed from the ground up so that only the most necessary code is compiled. In addition, you can disable optional CSS code that is not needed in the tab "Others".

Optimised images load faster and consume less mobile data. Learn more.

Recommendations for efficient image encoding:

  • Use modern image formats
    • WebP, AVIF or JPEG 2000 are often more efficient than JPG or PNG.
    • WebP, for example, provides files that are 30 % smaller than comparable JPEGs at the same quality.
  • Compress images
    • Tools such as TinyPNG can reduce the file size.
    • Choose lossless or lossy compression depending on the use case.
  • Adjust the image size
    • Do not upload images larger than necessary.
    • Do not use CSS or HTML to resize large images, but save them directly in the appropriate resolution.
  • Use responsive images
    • Use the srcset attribute to load different image sizes depending on the device.
  • Enable lazy loading
    • With loading="lazy", images are only loaded when they appear in the visible area.

Diagnostics

Here you can find more information about the performance of your application. These figures do not directly affect the performance score.

Set an explicit width and height on image elements to reduce layout shifts and improve CLS. Learn more

Cumulative Layout Shift (CLS) measures how much elements on a web page shift unexpectedly while it loads. Such shifts can irritate users and lead to a poor user experience, for example when suddenly appearing content moves the text or buttons that are already visible.

Recommendations for minimising layout shifts:

  • Define sizes for media: Make sure that fixed widths and heights are defined for all images, videos and embedded content. This allows the browser to reserve the required space while loading, which prevents unexpected shifts.
  • Optimise web fonts: Use the CSS property font-display: swap to prevent text from becoming invisible or changing its size while fonts are loading, which can lead to layout shifts.
  • Load dynamic content carefully: Make sure that dynamically inserted content, such as pop-ups or banners, does not unexpectedly move the existing content.

This means that your web page should not have too many HTML elements. A very large DOM tree, i.e. an extremely high number of elements in the page code, is problematic because the browser has to do more work when loading and displaying the page, which makes it slower.

  • Total number of DOM elements:
    • Fewer than 1,500 elements is ideal.
    • More than 3,000 elements can impair performance.
  • Maximum DOM depth (nesting depth):
    • Fewer than 32 levels is recommended.
    • Nesting that is too deep can slow down the rendering performance.
  • Maximum number of child elements per node:
    • Fewer than 60 direct child elements per parent element is optimal.
    • A very large number can increase the computing time for layout calculations.

Note:

By default, Shopware already has a fairly large DOM tree on which you have hardly any influence. Keep the navigation structure small and use as few and as simple elements as possible in your Shopping Experiences.

Last updated on

More from ThemeWare®: About ThemeWare® · Demoshops · Manual · Video tutorial · Utilities

This page online: https://knowledge.themeware.design/more-knowledge/seo-and-pagespeed/pagespeed-insights · ThemeWare® Service Portal, service.themeware.design