How can I improve my website speed and remove unused code?

How can I improve my website speed and remove unused code?

Kleonard89
Visitor
2 0 1

My site is cutebykimberly.com, it loads slow my score is falling I've installed and uninstalled apps trying them out unaware they leave junk code behind. Any recommendations for help or learning to identify to fix this and advice on upkeep for this problem? I can't afford to hire anyone to help me with this right now but any tips or information is appreciated. Thanks 

Kimberly
Replies 7 (7)
Kleonard89
Visitor
2 0 1

Any advice would be appreciated. 

Kimberly

Phoenixlab
Shopify Partner
3 0 0

Hello @Kleonard89 

 

You can follow some steps:

  • Convert images format to Webp.
  • Remove HTML / CSS commented code.
  • Reduce nested loops in liquid.
  • Add lazyload for all images.
  • Add conditions to the apps so it will load where it is needed.

 

You can follow all these steps for the optimize speed.

 

Thanks!

pacsigning
Visitor
1 0 0

 

First, convert any images to WebP format, which is optimized for faster loading. This will reduce image file sizes. The same issue I faced on my apostille website

Also, clean up the code by removing any unnecessary HTML or CSS comments to decrease code bloat.

When working in Liquid, try to minimize nested loops and complex logic flows where possible to keep things efficient.

Adding lazy loading attributes to images is another great way to improve load times, as this delays images from loading until they are near being viewed.

Additionally, use conditions when including apps so they only load on the specific pages where their features are needed. Selective loading prevents bogging down every page.

Following these optimization practices - converting images, removing comments, simplifying code, lazy loading, and conditional app loading - should help substantially improve your site's overall loading speed and efficiency.

oscprofessional
Shopify Partner
16116 2410 3126

@Kleonard89

I understand your concern about your website's speed and the challenges of managing it without hiring external help. Here are some steps and tips you can follow to improve your website's speed and address the issues caused by unnecessary code and apps

Start by using the tools mentioned in the previous response (Google PageSpeed Insights, GTmetrix, Pingdom, etc.) to identify specific performance issues on your website..

Review the apps and plugins you've installed on your website. Remove any that you don't actively use or that are redundant.

Ensure that you delete these apps correctly, as some may leave residual code behind even after uninstallation.

Large images can significantly slow down your website. Use image optimization tools or plugins to compress images without sacrificing quality. Ensure that images are in the appropriate format (e.g., JPEG for photos, PNG for graphics with transparency).


Minimize the number of JavaScript and CSS files on your website. Combine them where possible and use minification techniques to reduce file size. Consider loading JavaScript asynchronously to prevent blocking page rendering.




 

 
 
Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing | Oscp Upsell & Cross sell App : Free | Oscp Sales & Volume Discount App : Free | Custom Pricing Wholesale App : Free

SEOKart
Shopify Partner
171 4 26

Hi Kleonard,

 

Thanks for reaching out to the community!

 

Well, it is true that site speed is one of the key factors that influence user experience on the website. As you stated the key reason for slow website speed is heavy-weight scripting and the presence of a high amount of unused scripting and code, so here are some suggestions that you should consider:

 

  • Use PurifyCSS: With the help of this tool, you can scan the source code (HTML and JavaScript) of the website to ascertain the unnecessary and unused CSS code on your website. Thereafter, you can remove the identified unused CSS file on the website, clean up the stylesheet of your website, and optimize its loading speed.
  • Use AssetCleanUp Plugin: This is a free plugin that can be used to scan all the pages on the website, detect the unused CSS and JavaScript on the website, and disable those to improve the website’s speed.
  • Use PageSpeed Insights: PageSpeed Insights provides you with insights and information about the speed of your website on desktop and mobile devices. You can scroll down to the ‘opportunities’ and go to the prompt ‘reduce unused JavaScript’. Here, you can review the suggestions and remove the unused JavaScript from your website.
  • GZIP for Textual Compression: GZIP is a file format that can be used for file compression and decompression. It can be used to compress JavaScript and CSS files and improve overall website speed.
  • Implement Lazy Load for Javascript: You can implement lazy loading for certain elements of your website. Thus, this JavaScript shall only load on the website when required by the server, which can improve the overall speed of the website.

Hope it helps!

Leesha

SEOKart

https://apps.shopify.com/seokart
EagleHunted
Pathfinder
90 0 10

Hi @SEOKart 

I have checked the AssetCleanUp Plugin and noticed that it is designed for WordPress . Will it also work with Shopify websites?

 

EagleHunted
Pathfinder
90 0 10

Hi @Kleonard89 

I am experiencing the same issue with unused CSS, reducing unused JavaScript, avoiding excessive DOM size, and reducing JavaScript execution time. I am using a Shopify app page builder that is impacting my LCP and CLS. Have you found a solution to address these issues? I am noticing a high bounce rate on mobile due to these issues. Regarding the apps you uninstalled, it is recommended to contact the app developers to assist in removing any leftover codes from your theme, as suggested by Shopify.