Jump to content

Recommended Posts

I was wondering....

 

Is it possible to protect your JS file?

 

I read somewhere that you could scramble your JS file... but there were no further posts on that. Also i can only assume that a scrambled js file must be unscrambled at some point meaning that the unscramble function will be visible to the user meaning they would know how to unscramble the js file themselves.

 

I read that it is impossible to prevent the user from downloading the js file, is this true?

 

 

(this link is the discussion)

http://www.shaneng.net/Main/JavaScriptObfuscator

 

I found this free JavaScriptObfuscator... however being completely new to the concept... How do you implement the scrambled script to your site? Does it change all the functions names meaning you have to also change all the function names in the html source? 

Typically JS obfuscation (as with most) with change the variable names and the function names. With JS, I've found obfuscating (or even base64 encoding) can cause errors and typically isn't worth the trouble. Minifying is about as far as I go, even with files for work.

 

For minifying (which can slightly obfuscate a quick read) I typically use http://developer.yahoo.com/yui/compressor/ (or online variants)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.