Click to See Complete Forum and Search --> : [RESOLVED] Protect HTML, JavaScript, CSS


GrimmReaper
April 17th, 2009, 05:50 AM
As mentioned in an earlier post, I have site that make use of JavaScript menus; there are other JS also used for different purposes, but mainly the menus.

I thought it would be better for the company to protect the source codes, Copyright etc.

Now, i've tried just about every product which supposedly encrypts the pages, but i think i've only found one that may be useful.

I'm actually looking for advice on protecting the source, what are your opinions, what is the best approach?

I've heared so many people say " if it's on the web, it's there for the taking"
Granted, that may ultimately be the case, but I'd like to make it as difficult as possible for code snatchers..

Xeel
April 17th, 2009, 05:46 PM
1. "if it's on the web, it's there for the taking" :p
2. compress the js code into one big line (confuses lamers occasionally)
3. attach the js instead of putting it inside the same page
4. make a real mess of your pages so they become unreadable :D (works for lazy people who expect a clean code to borrow)
5. best and quickest menus are made using CSS (hover property) and IE hacks - not JS (http://www.tjkdesign.com/articles/Pure_CSS_Dropdown_Menus.asp)

PeejAvery
April 17th, 2009, 11:34 PM
The only code that can be completely protected is server-side code. Since JavaScript is a client-side, there is no way to keep others from copying it.

Your best option is to use JavaScript obfuscation. Still, that only makes it annoyingly hard to read.

GrimmReaper
April 18th, 2009, 04:41 AM
Thank you once again guys!
The only code that can be completely protected is server-side code. Since JavaScript is a client-side, there is no way to keep others from copying it.
So this means ASP etc.?
I'll look into it (still new to all this)

Your best option is to use JavaScript obfuscation. Still, that only makes it annoyingly hard to read.
If that seems to be the best option, how do i go about with this. As i stated, some of these programs etc. on the net only do half a job, with some, my menus ended up at the bottom, instead of at the top. Any suggestionsfor good obfuscators out there?

Thanks

PeejAvery
April 18th, 2009, 06:58 PM
http://www.google.com/search?q=javascript+obfuscator

GrimmReaper
April 20th, 2009, 06:46 AM
I'll have a look again. Sooner or later, I should find a good one.
Thanx!