473,508 Members | 2,240 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to make javascript not show up in client

77 New Member
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 1781
Brosert
57 New Member
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 Recognized Expert Contributor
javascript can run, but it can't hide.
Jul 23 '08 #3
maminx
77 New Member
javascript can run, but it can't hide.

nice..thanks

kind regards,

maminx
Jul 23 '08 #4
maminx
77 New Member
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 Recognized Expert Contributor
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 Recognized Expert Moderator MVP
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
17015
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
1612
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
11096
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
4888
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
2223
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
1521
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
5065
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
2411
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
2552
by: KRISHNA PRAVI | last post by:
the error is "runtime error object expected" here is the code....................................................................................... <script language="javascript"...
0
7231
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
7132
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...
1
7063
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5640
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5059
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3211
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3196
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
432
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.