The resulting code is not really meant as a way to obfuscate things, but to reduce size. But is still does our job, since it makes the code much harder to read. Even replacing the eval() it uses with document.write() makes it a confusing mess, and the comments are out.
we now use:
When the browser downloads the mentioned js.php, the id in it is checked against the database. When the timestamp in the database is too long ago (say five seconds), it returns a blank page, or a fallback script.
You can do this even more obfuscated:
This obtains the code using a XMLHttpRequest. That way, the code is not delivered as regular file to the browser, and the id can be submitted as POST variable. Of course, this only works when the script that asks for the file and the file itself are obtained from the same domain. It can still check against the database, and return something meaningfull when needed.
When you combine these techniques you can be sure that you gave your competition a serious headache. Don't be confident that they can't steal your code though. When the browser can read it, humans can too. But you can make the reading extremely difficult.