Minifying scripts
Code minification is a technique to remove unnecessary characters from the source code. Minify your JavaScript (.js
) and stylesheets (.css
) files and improve the load time of your site by compressing the files.
In order to activate this process in Magento, navigate to the admin area (http://localhost/packt/admin_packt
) and follow these instructions:
First, navigate to Stores | Configuration | Advanced | Developer.
Expand the JavaScript Settings options and select the Yes option for Merge JavaScript Files and Minify JavaScript Files.
Expand the CSS Settings options and select the Yes option for Merge CSS Files and Minify CSS Files.
Finally, click on the Save Config button.
CDN for Magento
Content Delivery Networks, also known as CDN, are servers of fast access for your static or non-dynamic content. JavaScript files and images are examples of files hosted on CDN servers.
The main idea behind the use of CDN is saving the process time of your Magento server using a CDN solution...