Use CSS Instead of JS to Improve Website Performance
Bhavesha | Jan 6, 2023 | 5 min read
TBT is the major reason for a lower Google page speed score on mobile devices.
The content below derives from our experience executing over 50+ speed optimization projects on Shopify websites. We have tried explaining how to load CSS instead of js for improving the site speed and solutions to minimize the impact on site speed.
- CSS can be used to apply styles and layout to a page, which means that the browser doesn’t have to recalculate the layout every time the page is updated. This can improve the perceived performance of the page.
- When using JS, the layout will be rerendered, which is not the case when using CSS.
- Image Slider
- CSS animations are responsible for the menu on mouse hover
Leave A Comment