How can I effectively remove unused Javascript and CSS from my store?

Topic summary

Core Issue: Merchants seek guidance on removing unused JavaScript and CSS files to improve Shopify store page speed, particularly code remnants left by uninstalled third-party apps.

Technical Approach Outlined:

  • Identify unused JS/CSS files in the theme’s asset folder
  • Remove code for uninstalled apps from theme.liquid file
  • Use conditional statements (e.g., {% if template == 'index' %}) to load scripts only on specific pages (homepage, product, collection)
  • Check app documentation before deleting files to avoid breaking functionality

Key Warnings:

  • Requires basic coding knowledge and familiarity with Liquid templating
  • Not recommended without technical background
  • Risk of affecting other website functionality if done incorrectly

Common Performance Issues Mentioned:

  • Mobile speed scores significantly lower than desktop (30% vs 80% in one case)
  • Largest Contentful Paint (LCP) problems requiring removal of lazy loading above the fold
  • Image sizing and third-party code impact

Support Offered: Cedcommerce repeatedly offers free first-time optimization assistance through direct messaging for merchants lacking technical expertise. Multiple users requested help with specific stores, sharing URLs and email addresses for personalized support.

Summarized with AI on November 15. AI used: claude-sonnet-4-5-20250929.

Hi,
Thank you for your email. This is my email address: serhatcal84@gmail.com
Where should I start with? to get help
Thank you,
Sincerely
serhat