« Back to home

JavaScript module patterns and code size

A few days ago I did some code refactoring: File Bytes before Bytes after requestform.js 41491 45884 requestform-min.js 23565 21058 What’s going on here? Well, the code is quite old, and was written using the direct assignment method of global abatement. Now that I’m more comfortable with JavaScript, I rewrote the code to use the revealing module pattern.…

Read more »