I'm writing an HTML5 based game that runs as a stand-alone application. It is distributed via the web, but there are no other server requirements—no database, etc.—everything is "in-app". This is by design since additional servers would raise the cost of distribution.
So given that it's just a static html file with a lot of JavaScript, what's to keep someone from hosting the file on their own site? Are there any techniques that can be used to help mitigate this?
My concern is not the odd user, it's the identity theft committed by the other site. Non-additional server solutions would be preferred, but any ideas would be appreciated.
I have found that this Javascript Obfuscator is the best protection you will get, it Makes your code completely unreadable, it supposedly shrinks it, and I have done a JSPERF and it seems to run faster as well.
www.javascriptobfuscator.com
The output code looks like this.
Just make sure you keep a copy of the original :)