How to remove unused JavaScript?

When I have my website analysed by Google Page Speed Insights, I get the "Delete unused JavaScript" error. 

Screenshot: https://ibb.co/h7PyMM5

How do I delete the unused JavaScript?

9,469 Views
Message 1 of 16
Report Inappropriate Content
15 REPLIES 15

@Thaniom  As an illustration you can study this that refers to Wordpress - https://metabox.io/remove-css-javascript-files-wordpress/ 

What is your initial load time at the moment?

9,456 Views
Message 2 of 16
Report Inappropriate Content

@NJRFTF Thank you for the link. The initial load time is 0.9 seconds.

9,439 Views
Message 2 of 16
Report Inappropriate Content

So I found the unused JavaScript and googled it. Turns out it's a major problem that can not be removed.

Post: https://community.weebly.com/t5/Site-Editor/How-to-stop-cdn2-editmysite-com-resources-being-loaded/t...

Sad to see that this still has not been fixed.

9,437 Views
Message 2 of 16
Report Inappropriate Content

image

Red is unused script. This could save me several seconds on my page.

9,433 Views
Message 2 of 16
Report Inappropriate Content

Any luck with this? I have the same problem, like a dozen examples of unused scripts that Google is suggesting I remove to improve my page load speed.

9,366 Views
Message 2 of 16
Report Inappropriate Content
Square

These are built into the CMS, so there isn't really a way to move or remove those, @EricW. Some are also necessary for the function of the site. That said, I'm hoping that we'll see some changes to this in the future.

9,363 Views
Message 2 of 16
Report Inappropriate Content

Weebly should take this issue more seriously. If not you are going to see many customers leave Weebly for not taking the time and effort to resolve this. This issue has been brought up to Weebly since 2016!!! People will eventually have enough of the "we hope to have a fix" responses with Zero actions and leave your company. 

9,310 Views
Message 2 of 16
Report Inappropriate Content

@Thaniom I can help reducing the unused JS / CSS, and optimize website speed in other parameters.
I still can't get rid of the unused code completely, because as mentioned here some files are critical to the website's finctions, but I can optimize the loading speed to a level that allows a very fast website.

The speed optimization process improves various factors, including Web Vitals (the new metrics from Google related to Page Experience: mainly LCP & CLS), font loading, image optimization, preloading, lazy loading etc.

Attached screenshots of my current Weebly website speed (desktop / mobile): 

imageimage

More info about website speed optimization

9,200 Views
Message 9 of 16
Report Inappropriate Content

@Adam This is a catastrophy. It has to be of higher priority. ALL Weebly users are being punished by Google because of this. What can we do about it? 

8,934 Views
Message 9 of 16
Report Inappropriate Content

Is this a pitch? or were you sharing how we can do this?

5,338 Views
Message 9 of 16
Report Inappropriate Content

Of all the bugs and flaws with Weebly, the weight of these editmysite .js files is the one that irks me the most. I hope it's resolved soon. It's getting to the point where I'll be moving all my Weebly sites to another platform.

5,033 Views
Message 9 of 16
Report Inappropriate Content

I echo the need for this to be a priority with Weebly.

We're a nonprofit being denied access to Google Ads because I'm unable to reduce unused JavaScript that would increase page speed. Why? Because I use Weebly.

Starting my research for other options.

5,019 Views
Message 9 of 16
Report Inappropriate Content

https://mastermarinesurveyor.net/index.html

Hey, bud check my site on desktop and phone and see how mine does. I am at 2.7s on desk and 7.0 on a cell phone. See what you think. Also on the phone, you can see an extra" marine surveyor" at the top of the page that should not be there and don't know how to remove it?   Thanks. Cary.

4,993 Views
Message 9 of 16
Report Inappropriate Content

sorry wrong post

4,989 Views
Message 9 of 16
Report Inappropriate Content

That's incredible! I can't get above a 2 🥴

4,953 Views
Message 9 of 16
Report Inappropriate Content