Deminify the Minified JavaScript Easily in IE 11

Deminify the Minified JavaScript Easily in IE 11

To build a fast and responsive web application we minified the  JavaScript files.  In other cases, such as JavaScript plugins, jQuery framework or even on demand code library are minified to be used directly. While this is good for performance,  one of the challenges of working with the minified version of file is,  it becomes really hard to read and debug. Because they are not properly  formatted and aligned.

If you are using IE11, with the developer toolbar, you can easily form deminify  the minified script and debug or read the code very easily.

Step 1 :  From the IE Developer Toolbar, select the “Debugger Tool” and then select the minified file from the list of loaded JavaScript files.

Select The Minified File

Step 2 : Consider, you have selected “jquery.js”, Minified code will look as shown in below.

Minified Code

Now the above code is hard to read or understand. Even if you want to debug it, you will have a tough time to set a breakpoint.

Additional Read :  Turning Your Websites into 3D View | Firefox 3D DOM Viewer

Let’s have a look to how to make it formatted.

Step 3 : select “Pretty Print”  button from the tool bar.

Click for Formatting Minified JavaScript

With this you will find all the code arranged and formatted as shown in below image.

Formatted Minified Code

Well, now the minified code is very much clear and organized to work with.

P.S : This is not a new feature of IE11, You can use IE10, 9, where you can find “Format JavaScript”option  under the “toolbox” icon.  This same feature is also available for other browse toolbar  such  as  chrome, safari, opera, also for Firefox, you can use Javascript Deminifier addons.

Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at http://abhijitjana.net , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.

One Comment to “Deminify the Minified JavaScript Easily in IE 11”

Comments are closed.