Reply
How do I hide my JavaScript source code
Old 10-14-2008, 07:06 AM How do I hide my JavaScript source code
Junior Talker

Posts: 2
Hi all

Please tell me
How do I hide my JavaScript source code

Thanks
Amisha_Sharma is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 10-14-2008, 07:31 AM Re: How do I hide my JavaScript source code
chrishirst's Avatar
Super Moderator

Posts: 15,313
Location: Blackpool. UK
don't put it online.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-14-2008, 10:26 AM Re: How do I hide my JavaScript source code
wayfarer07's Avatar
$frontend->developer

Posts: 1,372
Name: Abel Mohler
Location: Asheville, North Carolina USA
You can't hide it, but you can compress it, which obfuscates the code. Here are a few easy to use compressors:

YUI Compressor - requires Java - very good compressor
Packer - creates the most confusing, and smallest code, but scripts don't run as fast as YUI - this can be used online though. Select 'Base62 encode' for maximum effect.
The Dojo Compressor I've never used this one, but it's on the top-list. It also requires Java.
JSMIN By Douglas Crockford, this one has a very simple algorythm, but it is still good. Meant to be used in combination with JSLint.
__________________
<!--if a signature drops in the forest, and no one is there to see it, does it make a link?-->
wayfarer07 is offline
Reply With Quote
View Public Profile
 
Old 10-15-2008, 02:01 AM Re: How do I hide my JavaScript source code
Brian07002's Avatar
Super Spam Talker

Posts: 805
Name: Brian
Location: United States
Quote:
Originally Posted by chrishirst View Post
don't put it online.
Lol, I thought that was really funny chris! I needed that one...
Brian07002 is offline
Reply With Quote
View Public Profile
 
Old 10-15-2008, 02:03 AM Re: How do I hide my JavaScript source code
Brian07002's Avatar
Super Spam Talker

Posts: 805
Name: Brian
Location: United States
Quote:
Originally Posted by Amisha_Sharma View Post
Hi all

Please tell me
How do I hide my JavaScript source code

Thanks
Actually, you can try encoding it, but believe me, people can still take what ever they want, even the most sophisticated 'trickster' out there can encode with the latest tools, but it won't last long, that is for sure. So the best way is the free way...Don't try to make it all 'yours'.
Brian07002 is offline
Reply With Quote
View Public Profile
 
Old 10-15-2008, 02:08 PM Re: How do I hide my JavaScript source code
Novice Talker

Posts: 13
You can't hide it. The question is WHY to hide it?
rirara is offline
Reply With Quote
View Public Profile Visit rirara's homepage!
 
Old 10-15-2008, 04:50 PM Re: How do I hide my JavaScript source code
Learning Newbie's Avatar
Moderator

Latest Blog Post:
Republicans Are In Trouble
Posts: 5,531
Name: John Alexander
Of course, all of these obfuscators have the side effect of making your code impossible for you to debug.
Learning Newbie is online now
Reply With Quote
View Public Profile
 
Old 10-15-2008, 05:34 PM Re: How do I hide my JavaScript source code
wayfarer07's Avatar
$frontend->developer

Posts: 1,372
Name: Abel Mohler
Location: Asheville, North Carolina USA
I never use them to obfuscate, only with the intention of speeding things up. Of course, I have to keep a debug version on hand...
__________________
<!--if a signature drops in the forest, and no one is there to see it, does it make a link?-->
wayfarer07 is offline
Reply With Quote
View Public Profile
 
Old 10-15-2008, 06:39 PM Re: How do I hide my JavaScript source code
Decaf's Avatar
Experienced Talker

Posts: 49
Name: Adam
1) code it in php
2) Put them in a seperate folder (Ex. http://example.com/js/) And hide the contents from all from .htaccess [Oh wait, you can just save the website and get the .js files anyway...]
3) You can't
__________________
Decaf is online now
Reply With Quote
View Public Profile Visit Decaf's homepage!
 
Reply     « Reply to How do I hide my JavaScript source code
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Webmaster Resources Marketplace:
Software Development Company | Webhosting.UK.com | Text Link Brokers 


   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.14959 seconds with 12 queries