Contents
How do I protect my JavaScript code from being stolen?
Another solution, very highly abstracted, is to couple your javascript tightly with your server side code so that even if someone did steal your JS it would be too much work for them to use it themselves.
Can you make browser games with JavaScript?
JavaScript can be used to make games using a variety of platforms and tools. Both 2d and 3d libraries can be used in combination with JavaScript to create fully-fledged games in the browser or external game engine platforms.
Is client-side JavaScript secure?
Is Parse.com client-side Javascript safe? Absolutely not. The client is in the hands of the enemy – you can never ever ever trust the client not to manipulate their data and/or the code that generates it.
How do I get the JavaScript code from a website?
Go to the outer edge of a site (e.g. far left), then right-click and click on “View Page Source” (or the option that’s similarly named). That will bring up all the HTML code, along with links to CSS files, Javascript, images, etc. You can now read through it and see what that page is created with.
How to prevent HTML5 video from being downloaded with JavaScript?
Here is a JSFiddle example. If you are going to disable right click using JavaScript then also store the source of the video in JavaScript as well. That way if the user disables JavaScript (allowing right click) the video will not load (it also hides the video source a little better).
How to prevent JavaScript code from being stolen?
You can minify or obfuscate your code, which will make it difficult to alter (but not to take an exact copy). Minification is recommended as it will result in your page loading slightly faster. Well, if you own the server, you can deny access from referers other than your own hostname.
How to prevent someone from seeing your JavaScript code?
You can also use Dean Edwards’ packer to pack your production Javascript codes. But take note that with Firebug or other debugging tools, most people are still able to see your code through the DOM tab/inspector. If someone does steel your code you can sue them. Your code is copyright protected. You are like the author of a novel.
How to keep your JavaScript less copyable?
Keep all your game data and logics on the server. Part of the game which is on the client side can be copied using appropriate tools anyway (even if it’s in Flash or Java), so just accept it and don’t care too much about it. To keep your javascript less copyable, because of bad readability, you can minify it.