July 27, 2019

1-day Project: DomainLockJS

James @Bangkokian

I just uploaded a one day project (Well.. maybe a day and a half) that's tangentially related to my main project. I needed a way of "locking" javascript code to specific customer domains. As soon as I had written it I thought, "This would probably make a pretty cool stand-alone SPA". It's been on my back burner for a while. And yesterday I took a break from my main dev project and hacked this together. It's not a commercial project. 'Just a "because it would be cool if someone made it" type of thing... It's not perfect., but it's very usable.

Hopefully someone finds it helpful.


  1. 2

    You should also provide non obfuscated script. I wouldn't be comfortable putting this on website without analyzing it.

    1. 1

      You're free to beautify it : )

  2. 1

    Just to be responsible:

    I already mention this on the site, but I feel the need to say it again here because there are some less-technical users around: If you need true security, please do not depend this or any other client side solution.

    The only true security is via server authentication. Javascript domain locks are cool deterrents to casual copying and theft. Any truly determined coder can get around them with enough time and effort.

    1. 1

      It's not "security" of any kind. As stated both here and on the site, please do not use this if you need security.