protect my JS files

Discussion in 'JavaScript' started by ottodo, Sep 9, 2006.

  1. #1
    Hello,
    I just want to know how can I protect my JS files?
    I want to protect these files, so no one can read 'em!
    Cheers!
     
    ottodo, Sep 9, 2006 IP
  2. ottodo

    ottodo Guest

    Messages:
    2,055
    Likes Received:
    70
    Best Answers:
    0
    Trophy Points:
    0
    #2
    No one helps? :(
     
    ottodo, Sep 9, 2006 IP
  3. sea otter

    sea otter Peon

    Messages:
    250
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #3
    What you want is a javascript source code obfuscator. Do a google search on "javascript obfuscator" and you'll get lots of results.
     
    sea otter, Sep 9, 2006 IP
  4. Jean-Luc

    Jean-Luc Peon

    Messages:
    601
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #4
    JavaScript is client side software. It runs in the browser of your visitor. If no one can read it, no one can execute it.

    All what you could do is to obfuscate it, but a clever user could read it anyway (as his browser can).

    Jean-Luc
     
    Jean-Luc, Sep 9, 2006 IP
  5. angellica2017

    angellica2017 Peon

    Messages:
    351
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Why you didn't try with HTML Guard or other stuff like that?
     
    angellica2017, Sep 10, 2006 IP
  6. VONRAT

    VONRAT Banned

    Messages:
    181
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    i dont understand why you need the hastle to make your script unreadable by the human eye ... if it is something really important then best you do the coding server side :)
     
    VONRAT, Sep 11, 2006 IP
  7. angellica2017

    angellica2017 Peon

    Messages:
    351
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Perhaps he don't want someone stole his script without his permission....
    I think that's his main purpose for hiding her script.
    Btw, you may not make any link exchange with hiding your script!
     
    angellica2017, Sep 12, 2006 IP
  8. VONRAT

    VONRAT Banned

    Messages:
    181
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #8
    hmmm .. didn't know that ... could you explain further? thanks
     
    VONRAT, Sep 12, 2006 IP
  9. ottodo

    ottodo Guest

    Messages:
    2,055
    Likes Received:
    70
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I don't want to do that, i just want to protect my function in my .js file

    :confused:
     
    ottodo, Sep 12, 2006 IP
  10. Pat Gael

    Pat Gael Banned

    Messages:
    1,331
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    0
    #10
    There is a script for doing that but requires your server support ASP

    
    
    http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=8053&lngWId=4
    
    Code (markup):
     
    Pat Gael, Sep 12, 2006 IP
  11. ottodo

    ottodo Guest

    Messages:
    2,055
    Likes Received:
    70
    Best Answers:
    0
    Trophy Points:
    0
    #11
    thx for sharing
    i'll check it right now
     
    ottodo, Sep 12, 2006 IP
  12. avakai

    avakai Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    You cannt hide the javascript. But you can do obfuscation. Use Ajax, so that you can hide mainlogic on the server and remaining in the javascript.
     
    avakai, Sep 16, 2006 IP
  13. ottodo

    ottodo Guest

    Messages:
    2,055
    Likes Received:
    70
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Well is there converter from js to ajax?
     
    ottodo, Sep 17, 2006 IP