JavaScript is minified by removing any unnecessary characters and whitespace from the code while preserving its functionality.
Related:
Here are 5 popular JavaScript minification tools:
- UglifyJS: UglifyJS is a popular JavaScript minification tool that is widely used in the web development community. It can minify JavaScript code and also perform code optimisation and mangling.
- Google Closure Compiler: Google Closure Compiler is a powerful tool that can minify JavaScript code and also perform advanced optimisations, such as dead code elimination and function inlining.
- YUI Compressor: YUI Compressor is a JavaScript minification tool developed by Yahoo! It can minify JavaScript code and also perform CSS minification.
- JSMin: JSMin is a lightweight JavaScript minification tool that removes whitespace and comments from JavaScript code.
- Closure Linter: Closure Linter is a tool that can be used to enforce coding standards for JavaScript code. It can also perform JavaScript minification using the Google Closure Compiler.
This post is part of: Page Speed Optimisation: A Complete Guide — created by our Page Speed Optimisation Specialists.
In this series:
- 8 Awesome Page Speed Testing Tools
- Page Speed: Minification of Code
- 5 Tools You Can Use to Minify HTML
- 6 Popular CSS Minifier Tools
- Awesome WordPress Plugins for Minifying CSS
- 5 Popular Javascript Minification Tools
- 6 Awesome WordPress Plugins for Minifying Javascript
- How to Optimise Images to Increase Page Speed
- Using Image Offloading to Improve Page Speed
- 10 Tools for Compressing and Optimising Web Page Images
- 6 Wordpress Plugins For Optimising Images
- Magento 2 Extensions for Optimising Images
- Shopify Apps for Optimising Images
- How to Use Caching to Optimise Page Speed
- Lazy Loading and How it Works
- Using a CDN (Content Delivery Network) to Improve Page Speed
- CDNs to Use With WordPress
- CDNs to Use With Magento 2
- CDNs to Use With WooCommerce
- SSL Impact on Page Speed Explained
- How to Fix Legacy JavaScript and Increase Page Speed
- How to Fix Large Network Payload and Improve Page Speed
- How Cache Control Improves Page Speed
- How to Use Expires Headers to Improve Page Speed
- How to Use GZIP Page Compression to Improve Page Speed
- How to Use Keep-Alive to Improve Page Speed
- Preloading Key Requests to Improve Page Speed
- Resource Hints Explained
- Enable Text Compression to Improve Page Speed
- How to Implement Brotli Text Compression
- Reduce Main Thread Work to Improve Page Speed
- How to Optimise Render-Blocking Resources and Improve Page Speed
- How to Use Asynchronous Loading to Improve Page Speed
- How to Reduce the Impact of Third-Party Scripts and Libraries
- 35 WordPress Tools and Resources to Improve Page Speed
- 28 Magento 2 Tools and Resources to Improve Page Speed
- 17 Shopify Tools and Resources to Improve Page Speed