4 ms·
After the fact might be too late for this, but there are defensive programming techniques you can use to make a cloner's job a bit tougher. In some industries,
by logicalmonster 4y ago
After the fact might be too late for this, but there are defensive programming techniques you can use to make a cloner's job a bit tougher. In some industries, this is more important than others.
> Obfuscate and compress your frontend code - It's harder to clone a big pile of random code that's not pretty.
> Put subtle watermarks in your site images - Makes their job harder and very easy to slip up.
> Use absolute rather than relative links so your own URLs appear everywhere in the site - It's easy for them to slip up and miss one.
> Use some of that obfuscated JS and frontend code to check what URL you're at and consider your options for redirecting, popping up a warning message, or rewriting the URLs in the body - it's a nightmare to try and figure out what a pile of crazy compressed JS actually does.
> Have your site rely on your own API in some fashion - hard for them to clone if they have to rely on you for the data.
> Put some hidden messages in your source code that might slide by a casual cloning job, but might be enough to verify ownership of the original code.
- andai 4y agoBrilliant. I'd add to this that the domain name shouldn't just be a constant at the top, because then they can just change it. My first guess is, make a few functions that "generate" it, kind of like what some people have on their websites for their email address.
- jackweirdy 4y agoGoing to plug my own blog from a few years ago to illustrate how you can generate strings and even functions from non-alpha code characters: https://www.jackwearden.co.uk/blog/bending-javascript-type-coercion/ https://www.jackwearden.co.uk/blog/bending-javascript-type-c...
- ActorNightly 4y ago>Obfuscate and compress your frontend code Even more so, while slightly advanced, you can set up a OTP verification on the front end before rendering things. JS code calls your backend which receives a OTP code (generated through some private key), and verifies this using public key. If obfuscated/minified properly, it would take some effort to reverse engineer properly. Additionally you can do sneaky things like make a request to your backend trigger on some random large time interval, where the Origin header is passed, so you can see which domain the client site got rendered from, and then return some displayed warnings about using a fake copied website.
- bobkazamakis 4y ago>If obfuscated/minified properly, it would take some effort to reverse engineer properly. ah, this strange network request fails with this base64 and it stops loading, whatever could it be!
- mike_d 4y ago> Even more so, while slightly advanced, you can set up a OTP verification on the front end before rendering things. How to get yourself de-listed from Google. This one weird trick all your competitors want you to know!
- ActorNightly 4y agono, just for the offending domain
- moneywoes 4y agoIs next js SSG good here?