If a packed Javascript saves 20kb off the download size, but takes a perfomance hit to unpack, then are there any benefits, besides obfuscating the code?
I’ve made this a community wiki because it may be open to some discussion.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Packed javascript code generally does not take longer to execute vs regular code. Most code packers will shorten variables, function names and use a host of tricks to make the source smaller. The resulting source is fully executable! You can verify this by taking a look at it during runtime with firebug. You’ll see the compressed code executing in its minimized form.