473,386 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

how to make javascript not show up in client

77
hello..

i have a question...
the script in javascript must be show up in client / html when we command "view source" in browser...

but i want to hide that script so it won't show up in client/html when command "view source" in browser

can i do that??how ?any idea?

thanks all,,

best regards,
mamin
Jul 23 '08 #1
6 1778
Brosert
57
Generally, you can't. You can write the code in a seperate file (using .js extension), but a determined surfer will be able to find it.
You could unescape small portions (see http://scriptasylum.com/tutorials/en...de-decode.html)

There are programs around that obfuscate your code, and you should be able to obfuscate your code (at least to an extent) manually as well. The simplest trick is to do the opposite of Good coding practice (ie use meaningless and indecipherable variable names, don't comment your code etc)...

Try searching for "Obfuscate Javascript"
Jul 23 '08 #2
rnd me
427 Expert 256MB
javascript can run, but it can't hide.
Jul 23 '08 #3
maminx
77
javascript can run, but it can't hide.

nice..thanks

kind regards,

maminx
Jul 23 '08 #4
maminx
77
nice..thanks

kind regards,

maminx

hey question again....

to not show up the javascript in client side /html is impossible, the other way is to encrypt the script, ok i agree...

but as i follow the tutorial in this URL Obfuscate Javascript

i must to trigger for encoding and the script must be in object so it has an id.
I can't do that because my script is located in the bottom of body, and it doesn't have any id or attribute

any idea??how to encrypt the script right from the page is opened, not triggered by event or attribute

thanks


kind regard,

mamin
Jul 24 '08 #5
rnd me
427 Expert 256MB
i really wouldn't bother. it wont stop me from viewing the output in the dom in firebug, and only makes tiny revisions a major PITA.

even without firebug, i would immediately recognize the decoder as a function, and unescape the source to get the decoder. wouldn't take more than a few seconds to crack. i use 'crack' lightly, because the system doesn't even need a password.


it also increase the size of your script files considerably.
Jul 24 '08 #6
acoder
16,027 Expert Mod 8TB
Why is it so important to 'hide' this code?

See Hide JavaScript code from the client for a nice discussion on the subject.
Jul 29 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: James | last post by:
Hello group: I'm trying to hide a panel control in javascript when a print button is clicked. On my web form, I have a button that fires a javascript function called doPrint(). No matter how I...
4
by: Lau Alvin | last post by:
HI all , I want to make a button which have a server side OnClick event in .cs to update the DB. But I want it to have a client side onclick event to run a javascript popup too. And the...
3
by: Wysiwyg | last post by:
After a server created cookie is processed on the client I want it removed, cleared, or expired in the javascript block but have been unable to do this. If I set a cookie value in the server code...
9
by: tshad | last post by:
This is from my previous post, but a different issue. I have the following Javascript routine that opens a popup page, but doesn't seem to work if called from an asp.net button. It seems to work...
6
by: Patrick Olurotimi Ige | last post by:
I have a Datalist in a form with a hyperlink i would like to make the hyperlink visible only when a checkbox is clicked and not visible when not clicked . But doing this below in page_load it...
4
by: cedwa | last post by:
I am developing a site at http://www.nwlmi.org.uk The problem lies with the CSS/XHTML Menu which relies on JavaScript to open and close the sections. The parent sections open and close fine but...
6
by: divya | last post by:
I have a page name edit.asp which should expire immediately .The user cannot open this page directly he has to provide a password for entering this page.thus when the user enters edit.asp , it has...
19
by: zzw8206262001 | last post by:
Hi,I find a way to make javescript more like c++ or pyhon There is the sample code: function Father(self) //every contructor may have "self" argument { self=self?self:this; ...
1
by: KRISHNA PRAVI | last post by:
the error is "runtime error object expected" here is the code....................................................................................... <script language="javascript"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.