x

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?

4,896 Views
Message 1 of 16
Report
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?

4,883 Views
Message 2 of 16
Report

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

4,866 Views
Message 2 of 16
Report

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.

4,864 Views
Message 2 of 16
Report

image

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

4,860 Views
Message 2 of 16
Report

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.

4,793 Views
Message 2 of 16
Report
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.

4,790 Views
Message 2 of 16
Report

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. 

4,737 Views
Message 2 of 16
Report

@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

4,627 Views
Message 9 of 16
Report

@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? 

4,361 Views
Message 9 of 16
Report

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

765 Views
Message 9 of 16
Report

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.

460 Views
Message 9 of 16
Report

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.

446 Views
Message 9 of 16
Report

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.

420 Views
Message 9 of 16
Report

sorry wrong post

416 Views
Message 9 of 16
Report

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

380 Views
Message 9 of 16
Report