- Posts: 5
- Thank you received: 0
Cumulative Layout Shift (CLS)
-
Andr989
Active member - Topic Author
- New Member
Less
More
9 months 2 weeks ago #51123
by Andr989
Cumulative Layout Shift (CLS) was created by Andr989
Hi,
Do you have any suggestions for improving the Cumulative Layout Shift (CLS) score in PageSpeed Insights? Since I started using this template, it has worsened significantly.
Regards
Do you have any suggestions for improving the Cumulative Layout Shift (CLS) score in PageSpeed Insights? Since I started using this template, it has worsened significantly.
Regards
Please Log in to join the conversation.
-
milos
Support Staff - Moderator
Less
More
- Posts: 6725
- Thank you received: 712
9 months 2 weeks ago #51125
by milos
Replied by milos on topic Cumulative Layout Shift (CLS)
Hello,
This is not related to the template but to your content. The most common causes of poor CLS are the following:
- Images without dimensions.
- Ads, embeds, and iframes without dimensions.
- Dynamically injected content such as ads, embeds, and iframes without dimensions.
- Web fonts.
More info web.dev/articles/optimize-cls
Regards,
Milos
This is not related to the template but to your content. The most common causes of poor CLS are the following:
- Images without dimensions.
- Ads, embeds, and iframes without dimensions.
- Dynamically injected content such as ads, embeds, and iframes without dimensions.
- Web fonts.
More info web.dev/articles/optimize-cls
Regards,
Milos
Please Log in to join the conversation.
-
Andr989
Active member - Topic Author
- New Member
Less
More
- Posts: 5
- Thank you received: 0
9 months 1 week ago #51169
by Andr989
Replied by Andr989 on topic Cumulative Layout Shift (CLS)
Hi,
Thank you for the advice; I'll conduct new tests. Additionally, I'd like to incorporate fetchpriority="high" and rel="preload" for the site logo, but I'm unable to locate the file for modification. Could you please point me to the path?
Thanks,
Thank you for the advice; I'll conduct new tests. Additionally, I'd like to incorporate fetchpriority="high" and rel="preload" for the site logo, but I'm unable to locate the file for modification. Could you please point me to the path?
Thanks,
Please Log in to join the conversation.
-
milos
Support Staff - Moderator
Less
More
- Posts: 6725
- Thank you received: 712
9 months 1 week ago #51170
by milos
Replied by milos on topic Cumulative Layout Shift (CLS)
Hello,
You can edit the code that displays the logo image in the file /templates/sparky_framework/library/logo.php. This is the line that displays the logo image:
Regards,
Milos
You can edit the code that displays the logo image in the file /templates/sparky_framework/library/logo.php. This is the line that displays the logo image:
Code:
<img src="<?php echo $media_path."/images/".$logo_img[0].$logoStyle.".".$logo_img_extension; ?>" <?php if ($retina_image) { ?>srcset="<?php echo $media_path.DIRECTORY_SEPARATOR."images".DIRECTORY_SEPARATOR.$logo_img[0]."-2x.".$logo_img_extension ?> 2x"<?php } ?> alt="<?php echo $logoImageAlt; ?>">
Regards,
Milos
Please Log in to join the conversation.
Time to create page: 0.254 seconds