473,834 Members | 1,468 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Disable View source

Hello to everybody,
I have some question concerning blocking view source from main menu of
IE or MF. I am able to block right click with <body
oncontextmenu=" return false"> but still missing from main View->Source
Code.
Any hints ?
Regards,
Roman

Jan 12 '06 #1
24 16099
Roman wrote:
Hello to everybody,
I have some question concerning blocking view source from main menu of
IE or MF. I am able to block right click with <body
oncontextmenu=" return false"> but still missing from main View->Source
Code.
You only think you can, you can't prevent that reliably at all. There
are many ways of viewing the source other than via right-click or
browser menus.

Any hints ?


Yes, don't even try. Anything you publish on a web server can be viewed
and saved by someone visiting the site. If you don't want that, don't
publish it.
--
Rob
Jan 13 '06 #2
"Roman" <ro************ *@gmail.com> wrote:
Hello to everybody,
I have some question concerning blocking view source from main menu of
IE or MF. I am able to block right click with <body
oncontextmenu=" return false"> but still missing from main View->Source
Code.
Any hints ?


Don't waste your time and don't annoy your visitors. Your source is
probably not worth to be stolen in the first place.

--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
Jan 13 '06 #3
Ivo

"Roman" <ro************ *@gmail.com> asks
I have some question concerning blocking view source from main menu of
IE or MF. I am able to block right click
Sorry, but no, you are not.
with <body oncontextmenu=" return false"> but still missing from main
View->Source Code.
Any hints ?


There is no way you can hide your source from us or anybody. All you can do
is discourage people. If the browser is to display a page, the raw code must
be present on the user's hard disk, if directly not accessible from the main
menu due to scripts, frames and whathaveyou, then certainly from the
Temporary Internet Files folder, or by whatever name the cache may be known
locally.

And this little beauty of a bookmarklet restores all kinds of menus:

javascript:(fun ction(w){for(va r%20i=0;i<w.len gth;i++){argume nts.callee(w.fr a
mes[i]);}try{function %20n(r){r.oncli ck=r.oncontextm enu=r.onmousedo wn=r.onmou
seup=null;}n(w. document);n(w.d ocument.body);} catch(e){alert( 'Bookmarklet%20 f
ailed:\n\n'+e.m essage);}})(top );

Really, it is more productive to put your energy into more fruitful
endeviours such as authoring innovative pages that people will want to come
and see, than hiding source code. If it is confidential, it doesn't belong
on the web.
--
hth
ivo
http://4umi.com/web/javascript/
Jan 13 '06 #4
RobG <rg***@iinet.ne t.au> wrote:
Roman wrote:
Hello to everybody,
I have some question concerning blocking view source from main menu of
IE or MF. I am able to block right click with <body
oncontextmenu=" return false"> but still missing from main View->Source
Code.
You only think you can, you can't prevent that reliably at all. There
are many ways of viewing the source other than via right-click or
browser menus.
Any hints?


While anyone with a will can see everything you've published and there's
nothing you can do stop that, there are several things you can do to
dissuade the casual looky-Lou from peaking at your code.
Yes, don't even try. Anything you publish on a web server can be viewed
and saved by someone visiting the site. If you don't want that, don't
publish it.


I think there should be a way to hide proprietary code. The need exists
and it's going to get bigger as hosted software becomes more commonly
used.

I'm about to market web-hosted medical diagnostic software that employs a
few proprietary algorithms. I've taken great measures to assure the app
isn't stolen, but I know that somewhere out there is a 13-year old,
pimply-faced kid wearing big glasses and a big grin who could get the code
if the mood struck him.

I wonder how owners of web-hosted applications are going to secure the
integrity of their ownership...

--
Ed Jay (remove M to respond by email)
Jan 13 '06 #5
Ed Jay <ed***@aes-intl.com> wrote:
I wonder how owners of web-hosted applications are going to secure the
integrity of their ownership...


They host the data as well.

--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
Jan 13 '06 #6
Ed Jay wrote:
RobG <rg***@iinet.ne t.au> wrote:

Roman wrote:
Hello to everybody,
I have some question concerning blocking view source from main menu of
IE or MF. I am able to block right click with <body
oncontextmen u="return false"> but still missing from main View->Source
Code.
You only think you can, you can't prevent that reliably at all. There
are many ways of viewing the source other than via right-click or
browser menus.

Any hints?

While anyone with a will can see everything you've published and there's
nothing you can do stop that, there are several things you can do to
dissuade the casual looky-Lou from peaking at your code.


What sort of threat - security or competitive - do such persons present?
How does preventing access to source code prevent anyone from
implementing a copy of your site? Getting the source code has never
been a requirement for knocking-off your competition.

Yes, don't even try. Anything you publish on a web server can be viewed
and saved by someone visiting the site. If you don't want that, don't
publish it.

I think there should be a way to hide proprietary code. The need exists
and it's going to get bigger as hosted software becomes more commonly
used.


A couple of methods spring to mind - there are others:

1. Provide downloadable binary executables - failed
2. Applets (Java, ActiveX) - rare, mistrusted
3. Xwindows and suitable X-client - never got off the ground
4. CORBA/IIOP barely drew breath - total failure

I'm about to market web-hosted medical diagnostic software that employs a
few proprietary algorithms. I've taken great measures to assure the app
isn't stolen, but I know that somewhere out there is a 13-year old,
pimply-faced kid wearing big glasses and a big grin who could get the code
if the mood struck him.
What will he/she do with it? How come eBay takes no precautions what so
ever? Or Google? Or even MSN? Because the value is in the service,
not the code.

You may as well complain that your competitors copied your idea of
putting in a front door to let the customers in. :-)

I wonder how owners of web-hosted applications are going to secure the
integrity of their ownership...


Those that try fail. Winners base their business on providing the best
service - their sites are kept up-to-date, they run efficiently in
(nearly) any browser, they offer useful content, they are open and
welcoming.

--
Rob
Jan 13 '06 #7
VK

Ivo wrote:
There is no way you can hide your source from us or anybody. All you can do
is discourage people. If the browser is to display a page, the raw code must
be present on the user's hard disk, if directly not accessible from the main
menu due to scripts, frames and whathaveyou, then certainly from the
Temporary Internet Files folder, or by whatever name the cache may be known
locally.


To be fair there is a way to have View > Page Source grayed out (not
available). But it is not achievable by client-side scripting. One need
to send a right sequence of response headers from the server. It is
also not supported by all browsers, and where supported it smashes down
the browser caching mechanics.

But it is an absolute true: service is the key to success, not a copy
protection. One should go by the presumption of innocence and do not
look at *your* future visitors as a bunch of thiefs. (But still think
of them as of a bunch of experienced server hackers - it is paranoidal
and it is *not* true, but it's the way to build a secure server
solution).

It is very difficult to believe when reading Internet news :-), but in
the most part these are the same people used to work for money and
respect someone else's property. The rest sign off for "shrink" (as
it's called in grocery stores).

Jan 13 '06 #8
VK wrote on 13 jan 2006 in comp.lang.javas cript:
To be fair there is a way to have View > Page Source grayed out (not
available). But it is not achievable by client-side scripting.


Try this to gray it out:

<http://devrijehuisarts .org/test/noViewSource.as p>

[sorry, no clientside script]

;-)

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 13 '06 #9
VK

Evertjan. wrote:
Try this to gray it out:

<http://devrijehuisarts .org/test/noViewSource.as p>


Right, I meant similar trick, and (besides other drawbacks) IE is the
only one (at least on Windows) who buys it.

Jan 13 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
13732
by: yaktipper | last post by:
This explains how to disable the view source / right-click menu in Netscape 4, Netscape 6 and Internet Explorer (IE). <script language="JavaScript"> //This code is the beginning of the right click disable function right(e) { //This function is for Net 4. if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)) {
1
8192
by: KS | last post by:
I write my html pages as .jsp files (java server pages). The final result when the page is rendered in the browser, and I do a view source, is nothing less the normal HTML codes. The problem is I have a .jsp file A called main.jsp which contains one form an serveral buttons. Main.jsp include a another .jsp file B called Internal.jsp which has its own form and several buttons. I have made a javascript that disables all buttons on A and B...
6
3178
by: nntp | last post by:
I have a set of links which I want search engines to crawl them, but I want to disable them from my visitors, so I will ask the link owners to pay me to let me enable them. <a disabled href="#">bahbahbah</a> Does not work, as it is still clickable. It only changes the color to grey.
29
9807
by: lori3laz | last post by:
How do you disable the right click>view source option on web pages so people can't view your coding and copy it? What's the html I need to include in my website to utilize this feature? Thank you.
1
445
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I disable the right mouse button? ----------------------------------------------------------------------- The oncontextmenu intrinsic event is the only safe and reliable method. Of the other approaches often presented, most depend on an alert box interrupting the process and rarely work. Note that oncontextmenu is a non-standard event and is not...
4
3840
by: Joe | last post by:
Hi, I have a customer who wants the View Source button disabled when people view his website. I explained to him how in ASP.NET the "real" code is in the code-behind module and not visible to the end-user anyway, but he really wants that View Source button disabled. Can anyone tell me how to do this?
4
2293
by: =?Utf-8?B?TUNN?= | last post by:
I am trying to disable ViewState at the application level. I have the following line in my web.config: <pages enableViewState="false"></pages> But it is not working. What can I do?
3
3675
by: visweswaran28 | last post by:
i want to disable save as option and view source option from menu could any one help.....
0
9796
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10790
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10505
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10214
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9329
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7755
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5624
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3976
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3079
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.