How do I hide the source code from my browser?

How do I hide the source code from my browser?

JavaScript Encryption This is by far the most popular way to try to hide one’s source code. It involves taking your code, using a custom made function to “encrypt” it somehow, and then putting it in an HTML file along with a function that will decrypt it for the browser.

How do you hide HTML code?

How to Hide an HTML Text Code

  1. Launch your HTML editor.
  2. Locate the text within the HTML document you want to hide.
  3. Type “<” followed by “!
  4. Type “—” followed by “>” (no quotes and no spaces) at the end of the block of text you want to hide.
  5. Save your HTML document.

Is it possible to hide JavaScript source code?

Any client-side javascript must be downloaded by users to run on their browsers, and can’t be hidden. You can minify/ uglify your code and if you want, and you shouldn’t feel compelled to also serve the original un-minified version.

What’s the best way to hide source code?

At best you can obfuscate the code so as to (try to) hide its meaning and behaviour. Obfuscation will not deter motivated attackers (it will just makes them a bit angrier), so it would be quite unwise to use it as foundation for your security model. If you want to hide code, don’t send it to the attacker’s machine; keep it on the server side.

Is it possible to hide JavaScript from visitors?

First, any server-side javascript that you may run (e.g., if you webserver is node.js) should be hidden from visitors. Any client-side javascript must be downloaded by users to run on their browsers, and can’t be hidden.

How to hide JavaScript code from client-simple examples?

You really should be looking at the overall system design instead, with things like: Enforce the use of HTTPS. Javascript should only be used to collect data and send to the server. The transactions are done on the server-side, totally transparent to the users. Public and private key cryptography. CSRF protection.