How to implement a JavaScript encryption in a website to hide its source code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to implement a JavaScript encryption in a website to hide its source code?

13th Mar 2017, 4:12 PM
Sidhant Kumar Nayak
Sidhant Kumar Nayak - avatar
3 Answers
+ 7
why would you need that? btw it's not really possible
13th Mar 2017, 4:28 PM
Kamil
Kamil - avatar
+ 1
you can't encrypt the code and really, why do you want to. There shouldn't be any sensitive data on your front-end. anyway, people use other methods like blocking the right click of the mouse or the key inputs to prevent users from opening the source code. personally, i find that really annoying.
13th Mar 2017, 4:31 PM
Nikunj Arora
Nikunj Arora - avatar
0
yeah its practically impossible to prevent users from viewing your source code without compromising the quality of browsing...btw you will find only 1 in a thousand users that will be interested in your source code...so, like Nikunj says, avoid sensitive data on your front-end
15th Mar 2017, 2:19 AM
Thabiso Lekgetho
Thabiso Lekgetho - avatar