Ben's right. The only way to keep a user from reading the source code of
your script is not to put scripts on your web pages. If you send the
script over the wire, you've given it to the user, whether our browser
allows you to display it or not. One doesn't even need a browser to read
your scripts, they could just telnet to port 80 on your server and
request the file directly. What you want simply can't be done, and we're
not going to fake it as Microsoft has done.
-Mitch
Ben Bucksch wrote:
> Henrik Gemal wrote:
>
>> Paulo Lopes wrote:
>>
>>> Is there a way to protect javascript code?
>>> Something like microsoft script encoder, but that aplies to Mozilla?
>>
>>
>> Nope. MS Script encode is stupid and very easy to decode.
>
>
> I think it's impossible. Mozilla is open-source. I can always hack my
> Mozilla to display instead of execute the JS.
>
> Apart from that, it is the wrong thing to do. The script is executed on
> the user's machine, so I believe the user has a right to see whst is
> being executed. Esp. because websites usually are not (and can not be)
> trusted by the visitor.
>
> Ben Bucksch
>
>