+ 3
How to host a code and just put embedd without anyone seeing my code in that website? The easiest and maybe no need to create ac
2 Answers
+ 2
Since html, css and JavaScript are actually interpreted in the browser, thereâs no way to hide it.
If there are things to hide, you need to do server side programming. Thatâs how forms are processed.
Most html is actually generated server side before itâs sent to the browser.
+ 1
Twin Chick đŁđŁđŁđ€đ€đ€đ„đ„đ„ There's no way to hide code that needs to be understood and run by the client (browser) as Jerry Hobby said.
The best way to protect sensitive data is to handle it server-side.
If you're worried about people copying your JavaScript code for whatever reason, you could consider obfuscating your code. This means that your JavaScript code becomes harder to read. You can do this using a bundler (build-tool) like Webpack. For a small project, you could even use an online service to obfuscate.
It's better than not obfuscating client-side code at all but it's not the same as handling things server-side. Be aware that there can be some performance costs of obfuscating.