Minify JavaScript and CSS

What is Minifying?

Minifying is the process of removing, or minimizing, unnecessary data, or code, without affecting how that resource is processed. Minifying code helps to reduce page load times and bandwidth usage, improves overall performance, and provides a better overall experience for users.

Why Minify JavaScript and CSS?

When web pages are being developed, all the JavaScript, CSS, and HTML that is created by web developers can contain unnecessary characters, spacing, code comments and markups, etc. While some of this data is great for helping to keep note on your assets (and anyone else on your team that will be working on your pages), once the pages are put into production, this additional content gets processed through servers and browsers, which is all unnecessary, but creates slower page load times. There are many tools available to minify JavaScript, CSS, and HTML.

Most JavaScript frameworks include minified files for developers, for instance, and there are many free tools available to minify CSS and HTML. Additionally, some CDNs (Content Delivery Networks) provide the ability to automatically minify all your assets, so you do not have to manually minify assets, which can be time-consuming. The original assets remain on your origin server, uncompressed and unminified, while the CDN stores the minified versions across the various cache servers.

lighthouse

Lighthouse

Lighthouse is an open-source tool that is used to run an audit against your web pages and provides scores and suggestions for improving page performance, accessibility, SEO, and more.

pagespeed

PageSpeed Terms

PageSpeed Insights is a tool created by Google that reports on the performance of a page on both mobile and desktop devices, and provides suggestions on how that page may be improved.

yslow

YSlow

YSlow is an open-source website analysis tool that can be used to identify web page performance issues. Learn more about the YSlow to enhance your web pages and the user experience.