Chapter 4. Understanding Slider Performance
How page speed is measured, why a slider at the top of a page matters so much, and the ideas JCH SwiftSlider is built on. Read this once and the settings will make sense.
Core Web Vitals and the Hero Slider
Google measures how fast and stable your pages feel with three numbers it calls the Core Web Vitals. They are measured on your real visitors' devices, they appear in tools such as PageSpeed Insights and Google Search Console, and they play a part in search ranking. A slider at the top of a page can affect all three.
Largest Contentful Paint (LCP)
How long it takes for the largest image or block of text in the first screenful to appear. Good is 2.5 seconds or less. When a slider fills the top of the page, its first image is almost always that largest element, so how quickly the first slide appears decides your LCP.
SwiftSlider protects LCP by putting the first slide in the page's HTML, loading its image straight away with high priority, and sending each device a file of the right size.
Cumulative Layout Shift (CLS)
How much the page jumps around while it loads, for example when an image appears and pushes the text below it down. Good is 0.1 or less. Sliders often cause jumps because their height is only known once an image or script has loaded.
SwiftSlider protects CLS by reserving the slider's exact space before anything loads. See the section called “Reserving Space So Nothing Jumps”.
Interaction to Next Paint (INP)
How quickly the page responds when a visitor taps, clicks or types. Good is 200 milliseconds or less. Large scripts that run while the page loads can make a page feel stuck.
SwiftSlider protects INP with a small script that starts only when the browser has finished its more urgent work, and that loads each feature, such as autoplay or swipe, only when a slider uses it.
On This Page