Improve Angular Application's Loading Performance in IE 11

Foridul Islam
2 min readSep 1, 2020

--

For every front-end developer, Internet Explorer is a pain. Microsoft has also, in fact, developed a new browser but some people still use IE.

IE is painful for developers because of some reason. Firstly, it is very slow to render and secondly, it is very difficult to debug code. These are the main reasons for developers to dislike IE.

But still, we have to give support in IE for our customers and for our jobs also.

To give support in IE, we face some common problems to run our applications in IE. Other browsers like Chrome and Firefox, there has support for the latest features. But IE has no support for many of the latest features. That’s why we need polyfills to run our applications in IE 11.

If we want to support IE 11, we need to do the following:

Update polyfills.ts

  1. Import all the ES6 & ES7 features that you need in your application because IE11 does not support ES5 and latest features, such as:

import ‘core-js/es6/function’;

import ‘core-js/es6/parse-int’;

import ‘core-js/es6/parse-float’;

import ‘core-js/es6/number’;

import ‘core-js/es6/math’;

import ‘core-js/es6/string’;

import ‘core-js/es7/object’;

2. import core-js and zone.

import ‘core-js/client/core’;

import ‘zone.js/dist/zone’;

3. Most importantly, import all angular UMD. If you don’t know what UDM is, then I can say a few short words about it: UMD stands for Universal Module Definition. It is the universal pattern for writing modules in Javascript. For details, visit here. So, import all angular UMD:

import ‘@angular/core/bundles/core.umd’;

import ‘@angular/common/bundles/common.umd’;

import ‘@angular/compiler/bundles/compiler.umd’;

import ‘@angular/platform-browser/bundles/platform-browser.umd’;

import ‘@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd’;

Finally

Serve your angular project or deploy it and run your application in IE11 and see the difference in performance.

Summary

Angular project support for IE11 should be easy now if you just perfectly update the pollyfills.ts in your application. Also, you should not use such methods or libraries that do not support IE, especially date processing.

Please add comments if you have any queries.

--

--

Foridul Islam
Foridul Islam

Written by Foridul Islam

Sr. Software Engineer at SELISE Digital Platforms

No responses yet