Compressing/Minifying MailChimp’s mc-validate.js

Minify CSS

MailChimp has been far from cooperative with helping developers speed up website loading by simply minifying their mc-validate.js file. There’s a growing thread on Twitter started over two — yes, 2! — years ago!

Here’s what i did to stop receiving terrible grades on GT Metrix and Google’s PageSpeed Insights.



in src in the default MailChimp embed code with the code in my gist. I prepended “local” to the default file name like so local-mc-validate.js and serve it on my own server. I took the MailChimp mc-validate.js file and minified it via to produce this

You’ll also need to supply a local, minified version of the .css file MailChimp uses horizontal-slim-10_7.css. Rename it to something like local-horizontal-slim-10_7.css just like the .js file.

Here’s the gist.

Hope that helps you speed up your websites.

Be sure to check out the two sister posts on leveraging browser caching and gzip compression.

If you found this post useful ...

Buy Me a Coffee logo
Wondering why you keep seeing lower-cased 'i' in my posts? Read -> Why ‘i’ is not capitalized

Leave a Reply


This site uses Akismet to reduce spam. Learn how your comment data is processed.

newest oldest most voted
Notify of

Thanks for this. But, one question. Where can I find it? The call to this script. /