Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hiding + Encrypting our Javascript Codings

Status
Not open for further replies.

davidku

Programmer
Aug 6, 2002
24
MY
Hello guys,

Is there any free resource that allow us to encrypt the Javascript coding so that a non-programmer can't copy or view it easily.

I found a tool at :
htp://
and try the evaluation copy and it seems can do the job pretty well. I just wonder any other free tool available without me purchasing it.

Thanks.
 
None of the tools work well, and are a waste of time, effort, and money. This question comes up frequently, and the answer from those who are experienced is always the same.

faq216-355

faq216-5090

Do a search in this forum for hide source code to see some of the answers to people who previously asked this question.

Lee
 
thanks for pointing out. I searched for the wrong keyword in the forum. will retry using "hide source code"

probably i should rephrase my question ...

i just don't want non-programmers copy my source code + modify it easily. by representing the code in a non readable manner, it will be harder for people who want to steal it.
 
Spend your time making your site good. You don't have anything that hasn't already been done and is available who knows how many places on the Internet already. You probably have code that you borrowed and modified from someone else, as well. Don't take yourself and your web work that seriously. Everyone on the MVP list here already knows that.

Lee
 
In order to use a browser, the user MUST upload my source code in a format the user's browser can understand.

Since I am giving implicit approval for uploading my code to his computer, I figure I lose many if not all rights to that code. In return, the vast majority of users are using my code to view pages for various reasons.

The few that copy my code for whatever reason are not good programmers. They will spend more time trying to force my code to work in their application than a good programmer will spend writing original code.

That is not to say that a good programmer won't use code once in a while, a line here or a line there, but not whole pages worth. And when the good programmer uses the code he understands the underlying principles and can quickly adapt the code to his situation. He rarely, if ever, uses the code unchanged.

Those that copy code wholesale make as few changes as possible. They don't understand the underlying principles, so they waste a lot of time, many times not realizing that the code they copied will not or cannot do what they want it to do. And of course they have no clue as how to modify it to fit their application.

Since my code is on the user's computer, I just figure that he can do anything he wants to do with it, so long as what he does is ethical and legal. There is simply NO way that I can control that code no matter what I do, so why worry about it? And let the idiots copy it and pull their hair out trying to make it work!!!!


mmerlinn

"Political correctness is the BADGE of a COWARD!"

 
That scriptasylum trick is an old one that we've all seen here many times. It's one of those cutesy things that impresses novices, but isn't that difficult to beat for anyone who's looked at the page source on more than a few pages. All the tricks you find are just that: tricks. There is no way to really hide your code besides not putting it on the Internet. Spend your time making your site GOOD, not tricky.

Lee
 
David,

To re-iterate what Lee and mmerlin have said - you will not stop people from stealing your code this way.

Although you might not like it, the fact remains that if you don't know how to encode and 'encrypt' your javascript even better than the flimsy attempt in the script you posted, then there isn't anything in your script that hasn't been done by the vast majority of the websites out there (which is available for free on even more 'script' repositories and libraries). Even the top Javascript Guru's on this site would probably agree that *most* of their stuff is available from numerous websites for free anyway, and all you do when applying these 'tricks' is make your site worse.. either by slowing it down or making it difficult to manage/maintain.

You say that you just want to hide it from non-programmers... well, only programmers will be interested in looking for it ! And the vast majority of them will work out how to decode your script in seconds. So what is the point really ?

As Lee notes, this question comes up a lot from beginners in this area, and the answer from all the experts is the same every time. Another similar favourite is the 'prevent copying of my images' request. Just as fruitless an activity.

A smile is worth a thousand kind words. So smile, it's easy! :)
 
Davidku,

Check this out --> thread215-1226100 where the HTMLBlock encryption scheme was specifically discussed.

If you scroll down a ways you can see where I posted the entire source of the page on the HTMLBlock website that was supposedly "protected" with that scheme.

Encryption like this will always be easy to crack because:
1) You must provide the browser with a method to unencrypt it.
2) Anyone wishing to view code it knows #1.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top