NetTalk Central

Author Topic: Any way to hide proprietary javascript?  (Read 2045 times)

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
Any way to hide proprietary javascript?
« on: August 28, 2009, 09:12:31 PM »
I've got a doozy of a javascript that was a bear to write. Is there any way to include this into a NTWS app, maybe calling it from a database or something? I can't get my head around this.
Mike Grigsby
Credify Systems
Central Oregon, USA

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: Any way to hide proprietary javascript?
« Reply #1 on: August 31, 2009, 06:19:21 AM »
there are 2 questions here;

a) is there any way to hide the javascript from the end user. The short answer is no. You can run it through a minimizer (jsmin etc) which will make it harder to read (and smaller) but the end user can run it though a reverse process if they want to. There's no such thing as "compiled" javascript, - it has to be source code for the browser - that's what javascript it.

b) on the server side it doesn't have to be in the web\scripts folder. you could store it in a database if you like. (There's an example, um, #40 I think that shows serving files from a database.)

Cheers
Bruce