The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Keep script code secret?
JasonRay
post May 6 2016, 06:22 PM
Post #1





Group: Members
Posts: 1
Joined: 6-May 16
Member No.: 24,228



Hi. I'm a newbie in html script programming, so please excuse 'dumb' questions smile.gif

My question: is it possible to write code which:
-executes on the user's machine, at best in the browser so that any machine running a web browser can execute the code, independent from OS and platform
and
-keep the code 'SECRET', i.e. so that no user or organization can (easily) view or decompile the code?

I mean, when I write a native C++ program it is in practice difficult/impossible to decompile it or understand the included algorithms from disassembly.
When I write a JavaScript plugin the code can, without greater efforts, be viewed by anyone, right?

So is there a way to run a program in the user's web browser while preventing the used algorithms to be viewed and copied by anyone else?

Thanks.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post May 6 2016, 07:09 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



QUOTE(JasonRay @ May 7 2016, 01:22 AM) *

When I write a JavaScript plugin the code can, without greater efforts, be viewed by anyone, right?

Yes.

QUOTE
So is there a way to run a program in the user's web browser while preventing the used algorithms to be viewed and copied by anyone else?

In general, no. For some applications (such as calculations) you might run as much as possible of the code at the server, and only let javascript/Ajax see the results.

Or you might let Ajax fetch only small parts of the javascript at the time from the server, but this just makes it harder (not impossible) for the user to view it all.

But see also https://en.wikipedia.org/wiki/Encrypted_Media_Extensions



User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th April 2024 - 03:15 AM