Yesterday I got this question on IH:
"Why should I purchase a license when I can just rip the scripts and styles from your website?" direct link
It's a fair question, and you're right, you probably can do this easily, I don't judge.
I decided to jot down some thoughts on why I don't fight-this-fight below:
I've tried to make it difficult, I first experimented with obfuscating the JavaScript code. The result was impossible to read, also 1.5 × bigger, slower to execute, and introduced bugs.
So I had a choice to make:
A. Slow site. Difficult to access/rip code.
B. Fast site. Devs who are not interested in buying can rip code.
Easy choice 🤷♂️
Then I thought about adding a domain lock to prevent customers from using the product multiple times. A way to enforce the license model.
Having the script make a quick call to a server was out of the question, that would introduce all sorts of privacy concerns. Also, what if my server wasn't running.
A JavaScript domain lock with a key would be easy to remove as the check would have to be done fully client-side.
I've always rolled my eyes at DVD piracy warnings and other DRM solutions. So it would be kind of hypocritical to play the same cat and mouse game.
I decided not frustrating customers had a higher priority.
People who're running a business and are interested in a client-side library:
A. Don't want to risk running their business on ripped code
B. Have the money to spend
C. Don't have time for shenanigans
If you're thinking about building and selling products that solely run in the browser and the worry about piracy is holding you back. Stop it.
Get started and build something awesome.
I think you're absolutely right, and it works like that for non-client-side software too. I don't have any piracy protection in Polypane. It'll add inconvenience for my actual customers and pirates will just find a way around it. So the people that support you are inconvenienced while the people that don't aren't.
I think convenience always wins so you should focus on making your app and the services and support you provide around that (which can't be pirated!) as convenient as you can.
Spot on!
100%.
I've been selling fully downloadable boilerplate code for https://usegravity.app and here's little I can do to stop piracy.
What you're saying is true - when targeting businesses, people don't have time to mess around and generally have a good sense of morals.
Also, I think for people who purchase a premium product, the last thing they're going to do is share it with someone else for free after they've paid for it.
I once built a simple web app which generates color palette from an image https://www.hdrainbow.com
Someone from China converted the website into a android app(using some website to android app converter). It f*cked up all my google analytics data and I was looking at wrong data for long time :)
Damn :D
Great insights - its the first time I learn about this things called code obfuscation and locking domain.
For my website I'm using a free bootstrap theme, I thought about editing the comments made in the code so it won't be so easy to read through the html.. but I'm not sure if its worth my time.
For the actual content part (my website is content heavy) i decided to do something simple to make it harder to copy the content, I added some css to * to make text not selectable:
.unselectable {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
Would like to hear your thoughts/suggestion as you have more experience in this.
Hi, I wouldn't do that. It makes the copy on your website less shareable on social media. It probably also has impact on accessibility, and IMHO it might be perceived as annoying, it's surprising how many people will select text while reading.
Agree, these kind of hacks provide no benefit or any real security, so easy to overcome by anyone with minimal effort & desire. Also no real risk in selecting stuff.
Suffer from similar with one of my banks which prevents pasting into any forms.
Somehow they think me reading and typing is less error prone than copy pasting a guaranteed correct account number or payment amount.
Someone, somehow thought it would solve whatever solution but it actually messed up basic usability and introduced a mass of potential issues.
This comment was deleted 7 years ago