Hide javascript

Discussion in 'JavaScript' started by look4guna, Dec 14, 2010.

  1. #1
    Hi friends,
    Is there any ways to hide our javascript code? i knew separating javascript code to external js file might help at some level but it is not completely fool proof.

    Do you know anyother ways to hide it? let me know... Thanks;)
     
    look4guna, Dec 14, 2010 IP
  2. tvoodoo

    tvoodoo Active Member

    Messages:
    239
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    53
    #2
    Encrypt it... and decrypt each piece of code when needed.
     
    tvoodoo, Dec 14, 2010 IP
  3. look4guna

    look4guna Active Member

    Messages:
    60
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #3
    Thanks tvoodoo for your reply. Mostly we use javascript to avoid a post to the server, like checking,validation. but it can be used for other purposes too like to show/hide etc... when these things are encrypted takes bit more time to access these functions due to decryption , right? so any other ways tvoodoo..
     
    look4guna, Dec 14, 2010 IP
  4. tvoodoo

    tvoodoo Active Member

    Messages:
    239
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    53
  5. look4guna

    look4guna Active Member

    Messages:
    60
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #5
    I think by encrypt you mean compressing the js file right? yes, we can make it difficult to read. Nice links tvoodoo, thanks.
     
    look4guna, Dec 14, 2010 IP
  6. inblues

    inblues Peon

    Messages:
    35
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    javascript is open source. everyone can read it .. even we can decompress the compressed js.
     
    inblues, Dec 28, 2010 IP
  7. tvoodoo

    tvoodoo Active Member

    Messages:
    239
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    53
    #7
    You don't quite know what open source means inblues , just talking to make some posts.Javascript is Client Side , thats why it can't be very well protected , open source doesn't have anything to do with it.
     
    tvoodoo, Dec 28, 2010 IP
  8. inblues

    inblues Peon

    Messages:
    35
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    thanks tvoodoo, since you are so good and pro, please tell me how to encrypt and decrypt javascipt?
     
    inblues, Dec 28, 2010 IP
  9. tvoodoo

    tvoodoo Active Member

    Messages:
    239
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    53
    #9
    Guess that the code you're after needs to be purchased and not offered as you are trying to get it.
     
    tvoodoo, Dec 28, 2010 IP