Off Topic

billy kimmel

20 Jan 2021, 7:56 pm

[Pro] javascript

Is there a way to hide some javascript from source code viewers?

Billy

waltd

20 Jan 2021, 8:07 pm

No. JavaScript is an interpreted language, and it must be sent in the clear to the browser in order for it to be evaluated and run. That said, there are JS “minifiers” that crush readable code down to a form that only a machine could love, with every function name and variable reduced to a single letter or so. But that’s not the same thing as hiding it really, anyone who can read code can figure it out, it’s just unpleasant to read.

If you can “view source”, then you can read all the HTML, JS, CSS, SVG, etc. that a Web site might include. That’s a feature, not a bug. That’s how everyone learns how to use these languages.

Walter

On Jan 20, 2021, at 2:56 PM, billy kimmel <[email protected]> wrote:

Is there a way to hide some javascript from source code viewers?

Billy

Freeway user since 1997

http://www.walterdavisstudio.com