Obfuscating is the process of mixing up your source code to make it more difficult for prying eyes. ESC, described earlier,does a small amount of obfuscating by replacing variable and function names.This is the most basic form of obfuscating, but there are more.
This doesn’t look smaller, but keep in mind that the original script didn’t have tabs, spaces,or new line characters removed (the documentation suggests you use another tool for such optimization before using this utility).
The downside to this sort of obfuscation is that its startup time is slow because of the extra interpretation of the code. However, the overall file size can be cut significantly.
Microsoft Script Encoder (IE only)
To begin, you download the utility from Microsoft details.aspx?FamilyId=E7877F67-C447-4873-B1B0-21F0626A6329&displaylang=en). After it is installed, open up a DOS command line window and use the following syntax:
screnc inputfile outputfile
For example,the code from the previous section gets encoded into this:
If you specified an HTML file as input, the <script/> element is updated to have a language attribute equal to “JScript.Encoded”; if you specified a .js file as input,you must manually add the language attribute when referencing the file:
The downside to this technique is that it works only on Internet Explorer on Windows. After it is encoded, the script is essentially useless to any other browsers on any other operating systems. If you are sure that your only users are running IE on Windows (such as in a corporate Intranet), this may be helpful to you. Otherwise it’s best to go with an obfuscating utility that works across all browsers.
Java Script Related Tutorials
|Adv Java Tutorial||Core Java Tutorial|
|Java-Springs Tutorial||Java Servlets Tutorial|
|EJB(Enterprise JavaBeans) Tutorial||JavaServer Faces (JSF) Tutorial|
|Java Swing Tutorial||Java Tutorial|
|JavaMail API Tutorial||Java 8 Tutorial|
|Java XML Tutorial||Java Bean Utils Tutorial|
|The Java Debugger (JDB) Tutorial||Java.math Package Tutorial|
Java Script Related Interview Questions
|Java Script Interview Questions||Adv Java Interview Questions|
|Core Java Interview Questions||Java-Springs Interview Questions|
|Java Servlets Interview Questions||EJB(Enterprise JavaBeans) Interview Questions|
|JavaServer Faces (JSF) Interview Questions||Java Swing Interview Questions|
|Java 8 Interview Questions||Java XML Interview Questions|
|JavaFX Interview Questions||The Java Debugger (JDB) Interview Questions|
Java Script Related Practice Tests
|Java Script Practice Tests||Adv Java Practice Tests|
|Core Java Practice Tests||Java-Springs Practice Tests|
|Java Servlets Practice Tests||EJB(Enterprise JavaBeans) Practice Tests|
|JavaServer Faces (JSF) Practice Tests||Java 8 Practice Tests|
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.