How can I protect a js file?

Asked

Viewed 41 times

0

Well, my doubt is very simple, I intend to protect somehow a file . js, so that no one can see my code.

Is it possible to do that? In other words, I intend that no one has the possibility to see my code.

How can I do it?

Thank you.

  • Nope, other than minifying the code, which makes it very difficult to read

  • Javascript code in the browser will always be visible, after all the browser needs to read the file for it to work. The most that Voce can do is minificar, as Marcelo said. As soon as you ask him, why do you want to do this?

  • The Javascript that is interpreted by the browser. It needs to be "viewed" by the browser. What if the browser "sees". Anyone can see.

  • Yeah, you’re right, you can’t really hide.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.