Skip to content Skip to sidebar Skip to footer

Is It Possible To Hide Or Scramble/obfuscate The Javascript Code Of A Webpage?

I understand that client side code must be readable from the browser but I wonder (since there are too many things that I ignore) if there are ways to obfuscate to code to the end

Solution 1:

It is good practice to minify your JS with a tool such as YUI Compressor. I would not obfuscate it unless you have a specific need to do this. There are plenty of online obfuscators such as this one

See this article: http://developer.yahoo.net/blog/archives/2007/07/high_performanc_8.html

Solution 2:

Check this out.

Other than min'ing it, I don't think you can really hide js. It all goes the user's browser and there are plenty of ways of seeing it once its there.

Solution 3:

See here for a Free Javascript Obfuscator.

Given that it is in fact possible, if the reason you intend to obfuscate is to protect intellectual property, you are probably trying to derive value from your work the wrong way. It's fairly easy to reverse the obfuscation, and you would probably be wasting time maintaining your code.

Focus more on what services you intend to provide to those who visit your site as a means to differentiate your site from competitors

Solution 4:

There are tools that could be used to compress javascript code and render it difficult for the end user to understand.

Solution 5:

Is there a reason why this won't do the trick for you?

http://www.javascriptobfuscator.com/

Post a Comment for "Is It Possible To Hide Or Scramble/obfuscate The Javascript Code Of A Webpage?"