vallabh mahajanwew
vallabh mahajanwew

Reputation: 25

Hide source code

I have basic knowledge of html css. I don't want my content to be stolen by people. I want to display content only on my web-page and not on source code. So how can I achieve that?

Upvotes: 0

Views: 260

Answers (3)

Andoitz Jordán
Andoitz Jordán

Reputation: 94

I cant find a reason to protect your html code. You can go anywhere you want and download the html and css code if you want to, but there is not a good reason to do that.

If you write code in HTML, CSS or JavaScript there is no way you can "protect" your code. They are client side languages, this means your code is executed by that client (anybody).

Upvotes: 1

Freyja
Freyja

Reputation: 40804

No you can't.

Because the web browser needs to download the HTML, JavaScript and CSS files to view the web page, there's no way to perfectly hide this. (None of the major browsers even try to do this, and even if they did, it would be easy to work around.)

Instead, what you can do is obfuscate the code. This doesn't hide the code (so it can still be copied) but it makes it harder to understand. This doesn't make it impossible, though, and someone who tries hard enough will eventually manage to do it.

Upvotes: 0

Shobhit Walia
Shobhit Walia

Reputation: 496

Client side code is always execute on the client machine. I don't think you need to take care of this because all your logic at server side is not visible to client.

If you want to hide client code there is no way of doing that, but you can use minification just to make unreadable to the end user. But there are tool available in market which can undo the minification also

Upvotes: 0

Related Questions