Let's say I have a web application like a drag-and-drop Website Builder or something like Google Docs. If someone chose to right click and save the page, obviously our code along with its logic gets saved too. So assume this is a paid service, if the user has the source code, then he could generate infinite number of websites with the offline copy he has. The website builder is just an example, but I'm just asking for similar applications. How do you implement protection for such scenarios?
Obviously, you can't stop the user from saving the source-code, but I was thinking maybe you can perform some "validation" or "tests" within the JS to see if the editor is live from the intended URL. But, I'm not sure, how would you do it, if you had a full-fledged JS powered application? Your thoughts?
Thanks
If someone saves out your source code, then they can. You can put a copyright notice on it.
If they use it on their web site without permission, they're violating copyright. However, that isn't why it's not a problem.
All of your:
* Version history (except for public versions) * Unit tests, test plans, test data, test results * Bug trackers * Developers notes; QA engineers notes * Code maintenance manuals * Developers brains; QA engineers brains etc.
Are private, and someone leeching your content cannot obtain them.
Not to mention the fact that, if there are any server-side components, they'd need to reimplement them.
The time it would take them to understand your code, reproduce all the missing parts, they could just as well develop it themselves.
In fact, if they hired engineers with the calibre required to do that, the engineers would probably WANT to implement it themselves, not rip yours off.
Do not consider that the .js files are all of your development information. They aren't.
Additionally, the version that they leech is always going to be "behind" the one you're developing, right?
So in the time they take to figure out how your code works and how to integrate it with their own back-end systems, you'll have released a better (At least hopefully better) version. So they're permanently behind you, with an inferior product.