Power of JS & CSS Bundler and minifier

Chandan Kumar Roy
2 min readSep 23, 2017

When we build any website or app, our objective is to give the user a smooth experience and keep user active. To achieve the objective we should make sure that assets (i.e. CSS, JS) are loaded quickly. Assets are bundled and minified to improve the load request time.

Let’s go through the bundling & manification process one by one.

Bundling: Yes, you are thinking correctly “tie or roll up together”. Here, we roll up JS /CSS to make one JS /CSS file. This means fewer http request and better page load performance.

Sample

Minification : it means reduce the total file size .In this various optimisation is performed, such as removing comments ,white space and shorting the variable name .

JavaScript is minified
Sampled minified file

Impact on Load time when CSS is minified in below sample application: Load time is reduced nearly by 50% .

Page without minification
Page with minification

There are many libraries available for bundling and minifcation .

Let’s explore more .

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Written by Chandan Kumar Roy

Head of Software Engineering and Integration | MACH Alliance Ambassador

No responses yet

Write a response