Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Encrypting or Server Side Javascript

Status
Not open for further replies.

MeNimo

Programmer
Jun 2, 2003
9
US
Hi everyone.
I am new to this Javascript. I need a help in the following problem of mine.

Is it possible for me to encrypt the javascript so that the user cannot make any sense of it, but at the same time it works fine without any problems.
I have read many articles that we cannot disable this option of view source and better to use server side script.

Pardon my ignorance but what is Server Side Scripting ? How do I go about it. I donot want the clients or any users to see the code, mainly javascript code that is in the document to be sent to the client side.

Can any one help me ?

Thanks
Shanthi

P.S.:- And EdwardMartinIII, I did read your viewsource="No", pull on other people, it was really funny, for a second I thought wow I never knew of this feature at all. :)
 
MeNimo, if you read EdwardMartinIII's comment you should know from that thread you can't stop users from seeing your client script. In my opinion no one has any reason to hide script since there can't be anything that earth shattering in it anyway, it's only script.

Most developers that write real application code don't even have any code that needs protecting. I've been writing software for 14 years and i have never created anything that was ground breaking enough to worry about protecting it. The whole concept is a bit ridiculous if you ask me. Oh... right... you didn't [lol]

Have you obtained a copyright on your code? If you have, put a notification in the code and then you can sue anyone that steals it. There is probably more money in suing than you will make with the code anyway.

Ok sorry to go off like that but I am really worn out on this question being asked by every scripty come lately that passes through the script writers universe.

Server Side script runs on the server and is never sent to the browser so no users can see it, ever, unless your server is broken or unsecure.


-pete
 
palbano,
How about giving us a startup on server side scripting,
as i am a newbie to scripting as well...
 
>> How about giving us a startup on server side scripting

Well I don't know if I can post anything that will make sense but I'll give it a go.

Server Side scripting environments execute your code on the server providing a means to dynamically generate HTML responses (and others like images etc.) by interacting with Server resources like databases etc. There are many different server side environments. There must be thousands by now… ok hundreds… well there is a lot ok [lol]

Some of the most popular are Java Server Pages (JSP), Active Server Pages (ASP now ASP.NET as well) Perl, Python. Anyway they are all some form of scripting engine that can be integrated into a web server.

The integration provides a means for the web server to recognize a request that is targeted for the scripting environment. This recognition can happen in many ways like directory structures or file extensions etc. So the Web Server hosts the scripting engine (usually in a separate process) and then passes requests targeted for scripting resources on to the engine. The engine then processes your script and passes the resulting HTML stream back to the Web Server which conveys it on to the client (browser).


-pete
 
Hi Pete,

First of all I do understand you taking off on that one.

Well, I am also a programmer for say, not that less a number of years as of now. Say, 8 years if it counts as experience. I am just new to Javascript, I started working on this hardly a month back.

Secondly, There is always no problem in asking if you are really not sure, as you donot know when something new has come up.

Third, It is not my requirement. I can only tell my boss that it is not possible, but if he still asks me to check any kind of possiblities, i will have to work on the other options that i can give him.

And I think I already arrived at a not so good, but not so bad either solution before you replied to me, using server side scripting, JSP to be precise.

Thanks Anyway,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top