Hello everyone,
I’m facing some challenges with my website’s performance score on PageSpeed Insights. My site https://electrobobinagegoepfert.webflow.io currently has a performance score of 61 out of 100. The analysis indicates that JavaScript is one of the main factors slowing it down.
I want to keep all my JavaScript functionality, but I’m looking for ways to optimize its impact on performance.
Here’s what I have already done:
- Compressed and optimized images
- Removed unused classes and interactions
- Used
async
and defer
attributes for some scripts
- Enabled lazy loading for images
Despite these optimizations, the score remains low, especially on mobile.
I know that Webflow includes the webflow.js
file by default, which can significantly impact performance. However, I prefer not to export the site for now to maintain Webflow’s easy updating capabilities.
Does anyone have any suggestions or best practices to optimize JavaScript in Webflow without losing existing functionalities?
For example, are there ways to defer loading certain scripts or to identify and reduce JavaScript that slows down the site?
Thanks in advance for your help and advice!
Best regards,
Hi there!
Your site’s performance can be improved through several key optimization strategies while maintaining full functionality.
You can significantly reduce load times by minifying your site’s HTML, CSS, and JavaScript files. This process removes unnecessary characters without changing the code’s functionality. You can find detailed instructions for minification in our help center documentation.
Interactions should be used strategically - while they enhance user experience, too many can impact performance. Review your site and remove any unnecessary animations or interactions that aren’t essential to your user experience.
Another effective strategy is to limit linked elements on your pages. Each reference to an external server requires additional load time, so consider consolidating or removing non-essential external resources. For third-party scripts that are essential to your site, consider hosting them on your own server rather than loading them from external sources.
Hopefully this helps! If you still need assistance, please reply here so somebody from the community can help.
Hi,
It sounds like you’ve already made some great progress with optimizing your site’s performance!
The challenge you’re facing with JavaScript is common, especially when working with platforms like Webflow. Here are a few additional tips to help you further optimize JavaScript and improve your PageSpeed Insights score without losing functionality:
Load JavaScript Only When Necessary (Lazy Loading Scripts)
Use IntersectionObserver or other techniques to load JavaScript for non-visible content only when it’s needed.
Review and Minimize Inline JavaScript
If you have custom scripts embedded within elements (like onclick attributes), try moving them to external files and linking to them in your Custom Code section. This will allow for better caching and minification.
Minify and Combine JavaScript Files
Webflow allows you to minify your CSS and JavaScript under Project Settings > Hosting. Ensure that minification is enabled for faster loading.
Alternate, If you are optimizing JavaScript for performance can be complex, I’d recommend trying the Website Speedy app available in the Webflow Marketplace. It automatically handles JavaScript optimizations and offers other performance improvements, which could help you reach that higher PageSpeed score. You can try it with a 14-day free trial to see how it impacts your site’s performance!