locked
Is there any way that we can secure JavaScript code besides Obfuscate RRS feed

  • Question

  • User730064251 posted

    Subject: How to make JavaScript/Typescript code non-readable to anyone

    Target Environment: All Browsers

    Now a days most of the developers creating their applications using JavaScript frameworks. Similarly I am creating applications with typescript and react js. If anyone view the source of the page or with browser console they can understand what I am doing in the code. But is there anyway that I can secure the whole code? Obfuscate is one option I found but question is, that is the only one option we are having? 

     

    Monday, April 13, 2020 1:55 PM

Answers

  • User-821857111 posted

    Is there any way that we can secure JavaScript code besides Obfuscate
    No. In addition, it is a mistake to believe that obfuscation is a method of securing your JS code.

    Keep any commercially valuable algorithms out of client code. Place it in a web service instead. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 13, 2020 2:12 PM
  • User-474980206 posted

    Obfuscation is over hyped. With todays tools its pretty easy to reverse engineer any code (.net code has lots of decompilers and tools to undo obfuscation). In the past I have had to reverse engineer firmware code, it just takes time.

    You should not consider your code secret. You should consider your ongoing support the key factor for purchase.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 13, 2020 3:36 PM

All replies

  • User-821857111 posted

    Is there any way that we can secure JavaScript code besides Obfuscate
    No. In addition, it is a mistake to believe that obfuscation is a method of securing your JS code.

    Keep any commercially valuable algorithms out of client code. Place it in a web service instead. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 13, 2020 2:12 PM
  • User-474980206 posted

    Obfuscation is over hyped. With todays tools its pretty easy to reverse engineer any code (.net code has lots of decompilers and tools to undo obfuscation). In the past I have had to reverse engineer firmware code, it just takes time.

    You should not consider your code secret. You should consider your ongoing support the key factor for purchase.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 13, 2020 3:36 PM