How to clear unused code ?

TattooKits
Tourist
11 0 2

I found that after uninstalling the apps, the page will have a lot of unused code, affecting the speed of the page. Is there any apps that can clear all unused code of the website?

Replies 219 (219)
Chazz01
New Member
1 0 0

Hi @OliUK,

Could you please help me with my site? 
I am a complete beginner when it comes to code so 99% doesn't make sense to me. My site speed score is very low and I want to fix it but I don't know how. 

I installed an app today to resize the image files but I don't know what else to do. I saw on something I read about clearing the unused code from old apps etc but I don't know how to do that either.

Any help would be greatly appreciated.

Thank you!

www.infinitybeautyanddesigns.com.au

OliUK
Shopify Partner
230 2 43

Hi @Chazz01 ,

There is a really good opportunity to speed your site up. You should add 'lazy loading' to your images. There might be some apps that automatically do this for you, but basically the process is to add 

loading="lazy"

after every instance of <img , so it would be something like <img loading="lazy"> this will mean your images don't add to the initial load time of your pages.

There's also a chat app with a request (not huge), but if you have an unused chat app, it might be an idea to remove it.

Cheers,

Oli

 

——————————

Founder @ www.preproduct.io

The smarter way to launch products. 

 

 

TheSacredBear
New Member
2 0 0
Click to expand...
Hi Oli,


Having the same issue ourselves. Would be so kind to check our site too please? URL is www.thesacredbear.com

Many thanks

Jason
OliUK
Shopify Partner
230 2 43

Hi @TheSacredBear ,

You've got a much higher Google Lighthouse score than most of the stores I test.

Apparently, a request to Google for your custom fonts can block the main page load by nearly a second. This is solvable, as fonts can be loaded after your main page load. You sometimes see this when visiting sites where the font quickly swaps from default to custom. I'd get in touch with your theme developers and ask their advice on resolving this.

Good luck,

Oli

 

——————————

Founder @ www.preproduct.io

The smarter way to launch products. 

 

 

Menibig
Tourist
9 0 5

Hey @OliUK,

I just found this long thread and appreciate your help for everyone.

My site score now is really bad with a very quick and surprising decrease in the last couple of weeks.
Is it possible to ask for a quick opinion and tips for my site? How can I make it faster for mobiles mostly? (especially product pages)

Click to expand...

Thanks.

OliUK
Shopify Partner
230 2 43

Hi @Menibig ,

No worries, I've just had a quick look.

Top of Google's recommendations is to add 'lazy load' images. This can be added to any image by including loading="lazy" to the <img  element. It ships with most Shopify themes these days, but it would be a quick job if you need to hire a developer to do it.

There's also a 'Social widget' (app I'm guessing) that blocks your initial page load by 780ms. might be worth getting in touch with the developers and asking if everything can be loaded 'async'.

Good luck!

Oli

 

——————————

Founder @ www.preproduct.io

The smarter way to launch products. 

 

 

 

purplelotus
Excursionist
23 0 8

@OliUK,

I just came across this post and was wondering if you could help me as well?

https://purple-lotus.ca

OliUK
Shopify Partner
230 2 43

Hi @purplelotus ,

If you google 'chrome lighthouse report' you'll be able to see some of the different areas for improvement.

It looks like you don't have your images set to lazy load. There's some instructions in this thread on how to do that.
Also, you score took a small hit as this GIF: https://cdn.shopify.com/s/files/1/0586/5160/7208/files/IMG_5353_1024x.gif?v=1632456077 should either be a jpeg/png/webp if it's a still image.

Cheers,

Oli

 

 

Motee
New Member
2 0 0

Hi @OliUK,

I'm having the same problem and don't know where to find this unused code, I was wondering if you could help me as well?

https://elanesa.com/

OliUK
Shopify Partner
230 2 43

Hi @Motee ,

Yep sure. Google mentions that you should add lazy loading to your store. So images don't slow the page load down. (there are some instructions throughout this thread on how to do that)

Unused code wise, the biggest offender is your Facebook pixel. That's usually the case to be honest, so I wouldn't worry too much about that.
There's also some unused code from an app by a company called: simtechdev . It might be an idea to reach out to them and ask if they have any ideas on fixing this up.

Cheers,

Oli