FROM CACHE - en_header

How to clear unused code ?

TattooKits
Tourist
11 0 3

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 226 (226)
Qualitycheck
Shopify Expert
1432 114 234

Unfortunately, there is no app in Shopify that does this work of clearing out the code.

However, we can certainly help you in removing the unused code from uninstalled app if you can provide more details to it.

 

Looking forward to hearing from you.

 

Thanks & Regards,

Perennial Solution

MC_OnEx
Excursionist
12 0 5

i have the same problem causing major problem in my store. why are these apps not required to remove all there code when the app is deleted. people should be warned about this before adding any apps. is there any tool out there to identify the location of unused code. i can delete the code if i know what file its in and how to identify the code.

 
Remove unused CSS
 
2.2 s
 
Remove dead rules from stylesheets and defer the loading of CSS not used for above-the-fold content to reduce unnecessary bytes consumed by network activity. Learn more.
 
 Show 3rd-party resources (3)
                                                            
 
             URL                                      Size        Potential Savings
 
…admin/style-6eaaa8d….css
(cdn.shopify.com)                        195 KB     194 KB
                                                          
…assets/theme.scss.css?771
(cdn.shopify.com)                         17 KB     13 KB
                                                     
…assets/beans.css?771
(cdn.shopify.com)                       2 KB       2 KB
 
 
Qualitycheck
Shopify Expert
1432 114 234

Sorry but there are no tools available for identifying the unused code after deleting the app.

Jack-D
New Member
2 0 0

Can you help me out with this same problem?


@Qualitycheck wrote:

Unfortunately, there is no app in Shopify that does this work of clearing out the code.

However, we can certainly help you in removing the unused code from uninstalled app if you can provide more details to it.

 

Looking forward to hearing from you.

 

Thanks & Regards,

Perennial Solution


 

OliUK
Shopify Partner
232 2 45

We went through the Shopify app review process about 2 months ago and Shopify takes this issue quite seriously now.

They ask that app developers have a way to automatically remove any inputted code on the store. For example, we have a button on our 'setup' page. It might be worth re-installing said apps, just to make sure they don't have an equivalent.

 

Cheers,

 

Oli

 

——————————

Founder @ www.preproduct.io

Test and make sales for future products

 

Foresterbags
New Member
1 0 2

Hi, Can someone help me learn how to remove unused code? Unused JavaScript causes 2.7 sec delay on my website - I am sure it's caused from uninstalled apps. I ran speed test and after uninstalling some apps that I wanted to try but didn't like, it made my websit mobile speed score 34, when it was around 65. Thanks!

OliUK
Shopify Partner
232 2 45

Hi @Foresterbags ,

 

If you open your store on Google Chrome and then hold control and click the page, then select 'inspect' from the box.

Then click on the 'Network' tab on the top of the newly opened side panel. You should be able to see a waterfall diagram of your pages load time, maybe list out any slowly loading items (before the red line) especially if they contain the name of prior apps.

 

Is it your product pages that are loading slowly? or the catalogue/collection pages? If you copy and paste the code into this thread, I'm happy to have a quick look at it and see if there's anything obvious we could take out.

 

Cheers,


Oli

 

——————————

Founder @ www.preproduct.io

Test and make sales for future products

 

Amit_Sidhnani
New Member
1 0 0

These are a few codes under "warning"

A cookie associated with a cross-site resource at <URL> was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at <URL> and <URL>.
?_sc=1&design_theme_id=80898490470&frame_token=galQS4V8mtiNZ8WO_4g5P2pIZ1IUtbR2A6WxFKRKvuvFqdXCfa7mYCIG-zQbxC-iAOczXixo0Q3zNEwskyeBux_Rwe6BBg6q-czzeL35wwUeZMp1eEkLR1EkrZ0yTxPaf6qDXv2F_X8Qdz7X19cfcg%3D%3D:1 A cookie associated with a cross-site resource at http://the-everything-pro-store.myshopify.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
?_sc=1&design_theme_id=80898490470&frame_token=galQS4V8mtiNZ8WO_4g5P2pIZ1IUtbR2A6WxFKRKvuvFqdXCfa7mYCIG-zQbxC-iAOczXixo0Q3zNEwskyeBux_Rwe6BBg6q-czzeL35wwUeZMp1eEkLR1EkrZ0yTxPaf6qDXv2F_X8Qdz7X19cfcg%3D%3D:1 A cookie associated with a cross-site resource at https://the-everything-pro-store.myshopify.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
?_sc=1&design_theme_id=80898490470&frame_token=galQS4V8mtiNZ8WO_4g5P2pIZ1IUtbR2A6WxFKRKvuvFqdXCfa7mYCIG-zQbxC-iAOczXixo0Q3zNEwskyeBux_Rwe6BBg6q-czzeL35wwUeZMp1eEkLR1EkrZ0yTxPaf6qDXv2F_X8Qdz7X19cfcg%3D%3D:1 A cookie associated with a cross-site resource at https://myshopify.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
?_sc=1&design_theme_id=80898490470&frame_token=galQS4V8mtiNZ8WO_4g5P2pIZ1IUtbR2A6WxFKRKvuvFqdXCfa7mYCIG-zQbxC-iAOczXixo0Q3zNEwskyeBux_Rwe6BBg6q-czzeL35wwUeZMp1eEkLR1EkrZ0yTxPaf6qDXv2F_X8Qdz7X19cfcg%3D%3D:1 A cookie associated with a cross-site resource at http://myshopify.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
?_sc=1&design_theme_id=80898490470&frame_token=galQS4V8mtiNZ8WO_4g5P2pIZ1IUtbR2A6WxFKRKvuvFqdXCfa7mYCIG-zQbxC-iAOczXixo0Q3zNEwskyeBux_Rwe6BBg6q-czzeL35wwUeZMp1eEkLR1EkrZ0yTxPaf6qDXv2F_X8Qdz7X19cfcg%3D%3D:1 A cookie associated with a cross-site resource at http://paypal.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
?_sc=1&design_theme_id=80898490470&frame_token=galQS4V8mtiNZ8WO_4g5P2pIZ1IUtbR2A6WxFKRKvuvFqdXCfa7mYCIG-zQbxC-iAOczXixo0Q3zNEwskyeBux_Rwe6BBg6q-czzeL35wwUeZMp1eEkLR1EkrZ0yTxPaf6qDXv2F_X8Qdz7X19cfcg%3D%3D:1 A cookie associated with a cross-site resource at http://www.paypal.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
?_sc=1&design_theme_id=80898490470&frame_token=galQS4V8mtiNZ8WO_4g5P2pIZ1IUtbR2A6WxFKRKvuvFqdXCfa7mYCIG-zQbxC-iAOczXixo0Q3zNEwskyeBux_Rwe6BBg6q-czzeL35wwUeZMp1eEkLR1EkrZ0yTxPaf6qDXv2F_X8Qdz7X19cfcg%3D%3D:1 A cookie associated with a cross-site resource at https://paypal.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
?_sc=1&design_theme_id=80898490470&frame_token=galQS4V8mtiNZ8WO_4g5P2pIZ1IUtbR2A6WxFKRKvuvFqdXCfa7mYCIG-zQbxC-iAOczXixo0Q3zNEwskyeBux_Rwe6BBg6q-czzeL35wwUeZMp1eEkLR1EkrZ0yTxPaf6qDXv2F_X8Qdz7X19cfcg%3D%3D:1 A cookie associated with a cross-site resource at https://www.paypal.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
?_sc=1&design_theme_id=80898490470&frame_token=galQS4V8mtiNZ8WO_4g5P2pIZ1IUtbR2A6WxFKRKvuvFqdXCfa7mYCIG-zQbxC-iAOczXixo0Q3zNEwskyeBux_Rwe6BBg6q-czzeL35wwUeZMp1eEkLR1EkrZ0yTxPaf6qDXv2F_X8Qdz7X19cfcg%3D%3D:1 A cookie associated with a cross-site resource at http://shopifycloud.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
?_sc=1&design_theme_id=80898490470&frame_token=galQS4V8mtiNZ8WO_4g5P2pIZ1IUtbR2A6WxFKRKvuvFqdXCfa7mYCIG-zQbxC-iAOczXixo0Q3zNEwskyeBux_Rwe6BBg6q-czzeL35wwUeZMp1eEkLR1EkrZ0yTxPaf6qDXv2F_X8Qdz7X19cfcg%3D%3D:1 A cookie associated with a cross-site resource at http://recovermycart.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
gagfe-TwdZx-h9xbMHKWe1TqHx.js?shop=the-everything-pro-store.myshopify.com:50 InCartUpsell library 2020-05-22 12:29:59 +0000 loaded

OliUK
Shopify Partner
232 2 45

Hi Amit,

The message which is pretty much repeated throughout your log is a hot topic at the moment. Internet browsers are putting in stricter rules regarding cookies. Shopify knows about this and I think it was even talked about at the latest Shopify Unite web conference. 

Basically app developers have to push an update out to fix it. I'm suprised PayPal haven't already done this, but maybe there's something else going on that I'm not privy to.

To summarise, that error won't slow your site down, but it will stop certain apps functioning in future Chrome versions.

Cheers,

Oli

 

——————————

Founder @ www.preproduct.io

Test and make sales for future products

 

OliUK
Shopify Partner
232 2 45

Hi Jack,

It seems like 'Ali Reviews's is the app mostly slowing your product pages down.

Cheers,

Oli

 

——————————

Founder @ www.preproduct.io

Test and make sales for future products

 

brunashaqiraj
New Member
2 0 0

Hello , 

 

I'm having the same problem with this unused codes , please can you help me with that?

OliUK
Shopify Partner
232 2 45

Yeah, no worries @brunashaqiraj , post your site URL and I'll have a quick look.

 

 

——————————

Founder @ www.preproduct.io

Test and make sales for future products

 

brunashaqiraj
New Member
2 0 0

Thank you so much.

 

Here it is: www.shop.christinevalmy.com

OliUK
Shopify Partner
232 2 45

Hi @brunashaqiraj 

I don't think your sites that slow to be honest mate. The top loading times other than Shopify stuff looks like Google leads and there's also a failed request to this URL: https://unpkg.com/eventemitter3@4.0.4/umd/eventemitter3.min.js to get come javascript, this might be important for elsewhere on your site though.

Cheers,

Oli

——————————

Founder @ www.preproduct.io

Test and make sales for future products

 

 

 

lsmall
Tourist
8 0 2

Hi

I have the same problem. Rosylana.com. Thanks!

Google says remove unused javascript, what can I do about it? 

103.4 KB
77.5 KB
75.5 KB
66.4 KB
/shopify_v2.js
(cdn.judge.me)
87.1 KB
52.1 KB
/assets/ddr_embed.js?ddr_token=…
(d22ahnxn75jhdh.cloudfront.net)
68.5 KB
37.5 KB
47.9 KB
29.4 KB
32.3 KB
27.3 KB
/ellipsis.js?api_key=…
(script.metricode.com)
39 KB
23 KB
31 KB
19.5 KB
/5eef830….js
(cdn.getshogun.com)
42.7 KB
18.1 KB
25.3 KB
18.1 KB
21.7 KB
17.4 KB
16.1 KB
15.5 KB
16.9 KB
14.9 KB
…1.9.1/jquery.min.js
(ajax.googleapis.com)
33 KB
14.2 KB
31.4 KB
12.5 KB
14.1 KB
9.7 KB
13.8 KB
7.7 KB
16.9 KB
7.6 KB
18.7 KB
5.8 KB
/tag.js
(deluxe.onetag.io)
12.5 KB
5.6 KB
12.7 KB
5 KB
8.6 KB
3.7 KB
4.2 KB
2.7 KB
…2.0.0/shogun-lazysizes.js
(lib.getshogun.com)
4.8 KB
2.3 KB

 

 

OliUK
Shopify Partner
232 2 45

Hey @lsmall ,

I had a quick look at your site. There was a couple of errors you could look into, but sometimes these errors are just ungracefully managed results of fully operational apps.

The two that came up are: helpfulcrowd.com and getshowgun.com. If you're using both of these apps, then I wouldn't necessarily worry about it. Your product page load speed on my Mac is 1.58secs which seems pretty reasonable.

Cheers,

Oli

 

——————————

Founder @ www.preproduct.io

Test and make sales for future products

 

Arshpreet
New Member
3 0 0

Hey @OliUK can you help me too please my site score is just 34

here is my product page link

https://amichestore.com/collections/all/products/best-dad-ever-t-shirt

please help

OliUK
Shopify Partner
232 2 45

Hey,

On my internet your page loaded in just over 1 second, which seems pretty good. Both Paypal and Facebook pop up in the load time.

Here's Googles lighthouse report

 

Main-Thread Blocking Time

Shopify

694 KB

1,062 ms

Facebook

200 KB

101 ms

Google Analytics

38 KB

17 ms

Google CDN

65 KB

16 ms

PayPal

3 KB

13 ms

Klaviyo

18 KB

0 ms

Other Google APIs/SDKs

8 KB

0 ms

Google/Doubleclick Ads

0 KB

0 ms

 

——————————

Founder @ www.preproduct.io

Test and make sales for future products