![]() ![]() It does more than just Minifying the code. If you want an advanced Minifying Plugin for WordPress, then Fast Velocity is the one. There are not many features in this plugin, as its only task is to minify the code. WP Super Minify has more than 10,000 active installations, and it is working fine. The plugins combine and minify the JavaScript, CSS, and HTML files in a few clicks. It can also work with CDN to reduce the file size with the plugin, and serve them via CDN. This lightweight plugin gives you the option of selecting what code you want to optimize. Even, popular caching plugins do have this function.īut here are the best WordPress Minify Plugins: AutoptimizeĪutoptimize is one of the most popular WordPress plugins. You do not have to download and upload files manually. Installing a Minify plugin is much more comfortable, as the tool will automatically minify the files. Download the code files from your WordPress site, and then minify them using the online tools. You do not have to download the “optimized version” provided by GTmetrix. That can be don’t by FTP client, or you can replace the files with the cPanel. You have to replace source code files with the minified version. Now upload the downloaded minified Javascript, CSS, and HTML files into WordPress directory. We did the text before, and we can see in the result that it gives you the list of all the files.Ĭlick on the “optimized version.” This is the minified code that GTmetrix is giving to you. This can be done via the GTmetrix speed test. Step 1: Find all the code that needs minification. ![]() Many tools will help you in minifying the code files.īut you have to replace the code files with the minified code files manually. Manually does not mean you are going to remove all the characters from the code yourself. There are two easy ways to minify JavaScript, CSS, and HTML in WordPress. Test the speed of your website and check if you are getting the Code Minification issue. GTmetrix gives this result regarding the Javascript minification.Īs we can see, there are many scripts of whom we can reduce the file size by minifying them. To test, I am taking the HarperCollins India site. Let’s run the GTmetrix speed test to check if they suggest the Minification of code or not. And it is very simple to do it, and there is no risk involved. Though many experts say that this made a little difference to the speed, that difference is negligible.īut if it can make a difference, then it is worth doing it. That improves the loading speed of the site. ![]() The size reduces, and the page becomes lighter than before. Importance of MinificationĪs you can see, the minification of code is removing a lot of space from the files. I have taken the code from this Codepen Project to explain the minification. HTML minification removes the extra space, formatting, line breaks, and similar content.Īfter minification, the same HTML code look like this: Minification of Javascript deletes all the Javascript comments (//…) and the white space from the code.Ī clean Javascript code written by a coder look like this: let wrapperĬonst sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms))Īsync function writingAll (stringTarget, container) HTML Minification However, the size of the file has reduced due to the deletion of all unneeded extra parts. Now, the human may not understand the code, but for computers, it is the same as before. Minification means removing all the white space and extra characters from the code. But the browser does not need all the unnecessary elements of the code to execute it. There are line breaks, white space, comments, extra characters, etc., in the code to understand it. The developer writes the code for the computer and the humans as well. Minification means deleting the unnecessary parts of JavaScript, CSS, and HTML files to be more compact. Jump directly to Minifying the Java, CSS and HTML.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |