Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Can someone please give me step-by-step directions to remove unused java-script and render-blocking sources.
Can you share the store URL so that I can check the unused js files? You cannot remove the 3rd party app CSS and js.
The Opportunities section of your Lighthouse report lists all URLs blocking the first paint of your page. The goal is to reduce the impact of these render-blocking URLs by inlining critical resources, deferring non-critical resources, and removing anything unused.
-Resources are blocking the first paint of your page. Consider delivering critical JS/CSS inline and deferring all non-critical JS/styles.
Once you've identified critical code, move that code from the render-blocking URL to an inline script tag in your HTML page. When the page loads, it will have what it needs to handle the page's core functionality.
If there's code in a render-blocking URL that's not critical, you can keep it in the URL, and then mark the URL with async or defer attributes.
Yea I have no clue about coding. @oscprofessional My store url is www.amoursembrace.com .
You can not remove the Unused Javascript.
You have to use defer Async method for render-blocking sources.
Hello @Jimenez559,
This is Gina from flareAI app.
Here is a step-by-step process to remove unused JavaScript and render-blocking sources from your Shopify store:
1. Identify unused Javascript: Use tools like Google Chrome's DevTools or GTmetrix to identify the JavaScript files that are not being used on your website.
2. Remove the unused Javascript: Remove the identified JavaScript files from your theme's code. You can either delete the code or comment it out.
3. Minimize the remaining Javascript: Minimize the remaining JavaScript files to reduce their size and improve the loading speed of your website.
4. Combine multiple JavaScript files: If you have multiple JavaScript files, combine them into a single file to reduce the number of HTTP requests. This will improve the loading speed of your website.
5. Test your changes: Test your website after making the changes to ensure that everything is working as expected. Use tools like GTmetrix or Google PageSpeed Insights to check the loading speed of your website.
Also take a look at this reference link:
Gina
you can not remove unused javascript and if your website is wordpress use Wp-rocket to defer or async unused javascript to optimize your speed. if its not helpful visit
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025