How To Remove Unused CSS & JS?

Hi Guys,

At some stage through my sites development I’ve used certain features that have required both animate.css and jquery. Due to design changes I don’t believe these two files are needed.

Upon export I find that these two files are still being included within the code; is there an option I’m missing within blocs to remove these? I’ve scoured the html and can’t find any reference to these features and have manually deleted them from html without any noticeable detriment.

Many thanks in advance.

That’s curious. I recall one site of mine that is flagged for having a 404 error in the and it turns out to be linking to an image that had long since been deleted both from the site and project assets, yet still mentioned in the css.

In my case the project started life in an early version of Blocs 3 and since updated in Blocs 4, however the error remains and I don’t know of a way to fix that. My guess is that this is some sort of cache related issue.

Thanks @Flashman it did start out as a Blocs 3 project which initially used different animation effects, but those went long before I upgraded to Blocs 4. They’re not big files, just redundant now.

I wonder what happens if you add these features back into the B4 project and then immediately remove them. Hopefully Blocs will work it’s magic. If not, I’m curious if it adds multiple copies.

Mystery solved (I think), having looked at the comments within bootstrap, it looks as though bootstrap requires JQuery, which then calls certain animations from css??

Nevermind, they’re only small files I just wondered why they were there. Thanks for everyones input :sunglasses:

Yep Bootstrap 4 needs Jquery for some features however if you don’t use blocs animations (from menu) you don’t neeed animate.css afaik

1 Like

I have this exact same issue. Two images cropped up ten’s of times on Scrutiny in CSS files but they no longer exist or have been renamed.