Re: Hiding source code- some bad news

by Tom Gallagher <tleeves(at)yahoo.com>

 Date:  Fri, 14 Jul 2000 17:11:10 -0700 (PDT)
 To:  HWG_list techniques <hwg-techniques(at)hwg.org>
  todo: View Thread, Original
Rebecca Hines wrote:

> I have a client who wants his source code hidden. 
> Is there any relaible
> way to do this without adversely affecting search
> engine rankings?
> 
-------------------------------------
--- Bastyr wrote:
> The following code seems to work pretty well.  Of
> course it only works on browsers that support
> javascript though. 
> 
> <script language="JavaScript">
> <!--
> 
> var message="Copyright";
> function click(e) {
> if (document.all) {
> if (event.button==2||event.button==3) {
> alert(message);
> return false;
> }
> }
> if (document.layers) {
> if (e.which == 3) {
> alert(message);
> return false;
> }
> }
> }
> if (document.layers) {
> document.captureEvents(Event.MOUSEDOWN);
> }
> document.onmousedown=click;
> // --> 
> </script>
-------------------------------------------------

Unfortunately, the code above only prevents the right
click function from working.  It pops up a copyright
protection sign instead of the normal function.

If the user clicks on the toolbar at the top of IE and
uses View/Source or in NN uses View/Page Source, they
will get the source code anyway.

Tom Gallagher



__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail � Free email you can access from anywhere!
http://mail.yahoo.com/

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA