Search code examples
javascriptjquerypolyfills

why do minimized javascript scripts use the same variable names in the same order


A lot of functions from different sources seem to use a subset of "e t n r o i" for varible and parameter names. Most of Jquery's functions use this. Many polyfill scripts use these parameters. I have seen other scripts use these. Why use these specific variable names in this specific order? Are these scripts being minimized using the same program? Is there some type of advantage to using this?


Solution

  • This is done for zipping reasons (gzip). These characters are very common in the English language, and therefore will also be present more frequently in variables or values that cannot be minified. Which will make the gzipped version possibly smaller than if they were to use z q x j