Hi everybody. I have a .js file in one website, I don't want that this file can be downloaded or be shown in the source code of the file. I tried to protect the folder by an .htaccess file, with this solution i see that even the website can not use the script. Someone have an idea ?? Thanks for your reply. Regards.
Javasource is a Client Side scripting language. This means that it must be downloaded to the viewers computer to be compiled and run. You can use things such as AJAX to pass data between server side languages such as PHP and javascript, to keep security and interactivity balanced.
Try use referer check,but here only forbid direct to download,if the man use tool,here still can't work ok!
Nonsense. It hardly slows it down at all. I use Packer on all of my scripts. If it slows down your script by 20 seconds, then your script needs some serious rewriting - it's not the tool that is to blame. To answer the OP's question: it cannot be done. Lots of people have tried lots of ridiculous things, but Javascript can only be obfuscated. Obfuscated code can quickly and easily be converted into the original source code.
It will only slow down the people trying to get the code about 20 seconds, it will not slow down the scripts.
you can encode it instead of hiding Javascript coders programs are available ,they just make it unreadable Regards Alex