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:

  1. First, navigate to Stores | Configuration | Advanced | Developer.
  2. Expand the JavaScript Settings options and select the Yes option for Merge JavaScript Files and Minify JavaScript Files.
  3. Expand the CSS Settings options and select the Yes option for Merge CSS Files and Minify CSS Files.
  4. Finally, click on the Save Config button.

CDN for Magento

Content Delivery Networks, also known as

Get Magento 2 Development Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.