¿How to encrypt JavaScript Code?

Discussion in 'Javascript' started by Eduardo F. Sandino, Jul 11, 2006.

  1. Any one knows how to encrypt javascript code... other way than escape()
    and unescape() [not is encrypt but a way to protect source code ????
     
    Eduardo F. Sandino, Jul 11, 2006
    #1
    1. Advertising

  2. Eduardo F. Sandino

    bobzimuta Guest

    bobzimuta, Jul 11, 2006
    #2
    1. Advertising

  3. Eduardo F. Sandino

    Ian Collins Guest

    Eduardo F. Sandino wrote:
    > Any one knows how to encrypt javascript code... other way than escape()
    > and unescape() [not is encrypt but a way to protect source code ????
    >

    None, you put your code on the web, it can be read.

    --
    Ian Collins.
     
    Ian Collins, Jul 11, 2006
    #3
  4. Eduardo F. Sandino

    cwdjrxyz Guest

    Eduardo F. Sandino wrote:
    > Any one knows how to encrypt javascript code... other way than escape()
    > and unescape() [not is encrypt but a way to protect source code ????


    There really is no good way to hide your javascript from those with a
    decent knowledge of script and html. However, in some cases, you can do
    things on the server using a script such as php rather than using
    javascript on the client's browser. The viewing browser can not see the
    php - it can only see the results of what the php does. Of course some
    things can only be done by script on the browser. For example, some
    input from the browser user may be needed to complete a script action.
    However there is nothing to prevent you from using php on the server
    for most things and also javascript on the browser for a few things
    that php can not handle.

    I always wonder why someone is wanting to hide script. I see very few
    scripts that use really new and unique code. Most scripts are written
    using standard code that has often been used in the past. The main
    difference is how different sequences of code are put together to make
    up the complete script.

    If one can completely replace javascript with php, the php on the
    server can not be turned off by the client as can javascript on the
    browser. This could be important for those who present something
    important that is best done by script and who do not want to risk the
    small number of browsers with script turned off from seeing their
    important message.
     
    cwdjrxyz, Jul 12, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brett

    Can I encrypt aspx code?

    Brett, Apr 13, 2005, in forum: ASP .Net
    Replies:
    20
    Views:
    4,838
    Ken Cox [Microsoft MVP]
    Apr 14, 2005
  2. http://ejobseek.com

    Encrypt in Perl, De-encrypt in Javascript

    http://ejobseek.com, Sep 1, 2003, in forum: Perl Misc
    Replies:
    3
    Views:
    302
    James Willmore
    Sep 1, 2003
  3. Replies:
    8
    Views:
    152
    Thomas 'PointedEars' Lahn
    May 27, 2006
  4. Replies:
    1
    Views:
    148
  5. Replies:
    1
    Views:
    123
    David Dorward
    Dec 18, 2006
Loading...

Share This Page