javascript - Why are there "line terminators" at different max values for minified code? -
this question has answer here:
in particular google closure , uglify.
uglify uses 32k lines
https://github.com/mishoo/uglifyjs
while google uses 500 lines.
https://developers.google.com/closure/compiler/faq#linefeeds
one of them seem addressing ghost issue.
why such difference? true considerations regarding maximum length?
from closure compiler docs:
why there random line feeds in compiled scripts?
the closure compiler intentionally adds line breaks every 500 characters or so. firewalls , proxies corrupt or ignore large javascript files long lines. adding line breaks every 500 characters prevents problem. removing line breaks has no effect on script's semantics. impact on code size small, , compiler optimizes line break placement code size penalty smaller when files gzipped.
Comments
Post a Comment