I want to hide the source of my HTML5 canvas so that people can’t View the source is this possible?

In a word, No. The web is open and hiding your JavaScript away is next to impossible. You can make is harder for a user to read your code by using something like the YUI compressor but ultimately people are going to be able to read, debug and use your code. This is one of the things I love about the web; I’ve probably learnt more about web development from View source than I have any other method. I’m not naive though and there have been many instances of people stealing others code for their own financial gain which sucks pretty bad, just the other day I saw that Andy Clarkes Animate.css had been ripped off. Code obfuscation is really the only method of protection (and of course regular copyright laws) that you have… Personally, however, I’d be inclined to trust that developers are more keen to learn from you rather than blatantly rip you off.

Comments (0)

Skip to main content