In reference to a website. I understand anyone can copy JavaScript code from a site. However it is unclear to me if JavaScript can be hidden securely in an external .js file just as css is kept in an external file. Is it possible to prevent the code from being viewed and copied without using some scrambler software that will slow down my site? Thanks.
It is better to put the js code in external file, but you can't prevent the code from being copied, because js is browser-side script.
Can be decoded easily.!! Dean Edwards JS packer is a good one but it can also be decoded easily by changing eval to document.write.!!!
Thanks everyone for your responses. Maybe PHP can be used to partially do some of what JavaScript would be doing to limit copying. I know PHP is on the server side. I will have to study up on how far the limits can be pushed.