Case1: There are two snippets of code that are very similar and very gzip-able, one at the start of the document and the other is beyond 32kb at the end of the document. Does the minifier bring the two snippets together so that gzip will reach the second snippet?
Case 2: A snippet of code is used multiple times. Gzip repeating it would take a byte. But if that snippet is put in a function, it would require 1 byte for function
, at least 1 byte for the function name, 1 byte for () {
, and one byte for }
. Does the minifier turn functions back into repeated snippets of code for gzip?
I'm sure there are more cases I haven't thought of, but these two have been on my mind for some time and I'd like to either put them to rest or start implementing them in my own code.