Unable to view source

Discussion in 'HTML' started by Otuatail, Dec 18, 2003.

  1. Otuatail

    Otuatail Guest

    Can anyone tell me what code I use so that when someone right clicks on
    a web page youi get the Whats this message instead of a popup window
    for view source or save image.

    Paul
    Otuatail, Dec 18, 2003
    #1
    1. Advertising

  2. Otuatail

    rf Guest

    "Otuatail" <> wrote in message
    news:...
    > Can anyone tell me what code I use so that when someone right clicks on
    > a web page youi get the Whats this message instead of a popup window
    > for view source or save image.


    What if I want to right click and use the context menu to bookmark your
    page? You have just lost me as a return visitor.

    It's easy to inhibit right click and piss off you visitors. However anybody
    who wants to look at your source has at their disposal about 8 other ways of
    getting to it.

    Oh, by the way, there is this rule: The desire to hide your source code from
    anybody else is in inverse proportion to the value of that code to anybody
    else.

    Finally, did it ever occur to you to search the history of this newsgoup?
    This question comes up at least once a week and gives us lots of fun... Let
    the flames begin.

    Cheers
    Richard.
    rf, Dec 18, 2003
    #2
    1. Advertising

  3. Otuatail

    Chris Harris Guest

    Chris Harris, Dec 18, 2003
    #3
  4. Otuatail

    PeterMcC Guest

    Otuatail wrote:
    > Can anyone tell me what code I use so that when someone right clicks
    > on a web page youi get the Whats this message instead of a popup
    > window for view source or save image.


    It's a waste of time - anyone who has the ability to use copied source has
    the ability to get round the no-right-click script. If it's JavaScript code
    that you're after, all anyone has to do is switch off js.

    By the time a browser is displaying the page, the source is in the cache of
    the visitor's computer and, once it's there, it's always going to be a
    simple task to look at it - and the same with images.

    Your site may be the exception to the rule but, in my experience, the more
    someone tries to hide their code, the less it is worth stealing. The major
    sites - which have cost hundreds of thousands to develop - don't use
    no-right-click scripts and they have a far greater investment to protect.

    If you really must have a script, there are 2,000,000+ pages referenced at:
    http://www.google.com/search?q=right click script

    Or you could let others explain the problem more eloquently than I by having
    a look at:
    http://www.allmyfaqs.com/faq.pl?Hide_source

    --
    PeterMcC
    If you feel that any of the above is incorrect,
    inappropriate or offensive in any way,
    please ignore it and accept my apologies.
    PeterMcC, Dec 18, 2003
    #4
  5. Otuatail wrote in message ...
    > Can anyone tell me what code I use so that when someone right clicks on
    > a web page youi get the Whats this message


    I used this javascript below on one of my 'hobby' sites as lots of people
    were 'Hotlinking' to the images in message-forums.

    It's not perfect but it's cured the 'Hotlinking' problem. It's only placed on
    the "Enlarged images" pages if you want to try it here at ...
    http://www.Gilera-Nexus.co.uk - Just alter the text to suit your own
    requirements.


    <script type="text/javascript">
    <!--
    var ErrMsg = "Please do not 'Hotlink' to these images";
    function disableRightClick (btnClick)
    {
    if (navigator.appName == "Netscape" && btnClick.which == 3)
    {
    alert(ErrMsg);
    return false;
    }
    else if (navigator.appName == "Microsoft Internet Explorer" && event.button
    == 2)
    {
    alert(ErrMsg);
    return false;
    }
    }
    document.onmousedown = disableRightClick;
    -->
    </script>

    Cheers ..... Trevor, Bristol, UK. http://www.OnMyWindow.co.uk
    Trevor George, Dec 18, 2003
    #5
  6. Otuatail

    PeterMcC Guest

    Trevor George wrote:
    > Otuatail wrote in message ...
    >> Can anyone tell me what code I use so that when someone right clicks
    >> on a web page youi get the Whats this message

    >
    > I used this javascript below on one of my 'hobby' sites as lots of
    > people were 'Hotlinking' to the images in message-forums.
    >
    > It's not perfect but it's cured the 'Hotlinking' problem. It's only
    > placed on the "Enlarged images" pages if you want to try it here at
    > ... http://www.Gilera-Nexus.co.uk - Just alter the text to suit
    > your own requirements.
    >
    >
    > <script type="text/javascript">
    > <!--
    > var ErrMsg = "Please do not 'Hotlink' to these images";
    > function disableRightClick (btnClick)
    > {
    > if (navigator.appName == "Netscape" && btnClick.which == 3)
    > {
    > alert(ErrMsg);
    > return false;
    > }
    > else if (navigator.appName == "Microsoft Internet Explorer" &&
    > event.button == 2)
    > {
    > alert(ErrMsg);
    > return false;
    > }
    > }
    > document.onmousedown = disableRightClick;
    > -->
    > </script>
    >
    > Cheers ..... Trevor, Bristol, UK. http://www.OnMyWindow.co.uk


    I agree with you about the problem of hot-linking but I'm afraid that the
    above doesn't stop it. The script makes it marginally harder to find the
    file name for the image - one has to simply switch off js - but it doesn't
    actually affect hot-linking. That has to be done at the server.

    --
    PeterMcC
    If you feel that any of the above is incorrect,
    inappropriate or offensive in any way,
    please ignore it and accept my apologies.
    PeterMcC, Dec 18, 2003
    #6
  7. PeterMcC wrote in message ...
    > I agree with you about the problem of hot-linking
    > but I'm afraid that the above doesn't stop it.


    Obviously the folks who were 'hotlinking' didn't have quite the
    *intelligence* that the regulars on this group have !! (or else they felt
    sorry for me).

    > but it doesn't
    > actually affect hot-linking. That has to be done at the server.


    I realise that, but it was just a quick option when I realised the drain on
    my bandwidth was occurring.

    --
    Cheers ..... Trevor, Bristol, UK. http://www.OnMyWindow.co.uk
    Trevor George, Dec 18, 2003
    #7
  8. Otuatail

    Default User Guest

    rf wrote:
    >
    > "Otuatail" <> wrote in message
    > news:...
    > > Can anyone tell me what code I use so that when someone right clicks on
    > > a web page youi get the Whats this message instead of a popup window
    > > for view source or save image.

    >
    > What if I want to right click and use the context menu to bookmark your
    > page? You have just lost me as a return visitor.



    Or the thing I use a lot since getting Mozilla, Open Link in New Tab.
    Tabbed browsing is great, so it eally pisses me when someone monkeys
    with the right click.




    Brian Rodenborn
    Default User, Dec 18, 2003
    #8
  9. Otuatail

    Whitecrest Guest

    In article <xngEb.57224$>,
    says...
    > What if I want to right click and use the context menu to bookmark your
    > page? You have just lost me as a return visitor.


    I always look at this (and similar issue) like the "no shirt no shoes,
    no service" signs.

    It's not that I don't want you business, I just want you to do it my
    way. If you don't want to do it my way then fine, don't come in.

    At a store on the boardwalk of a beach, you would be silly to have that
    sign. At a fine restaurant you would be silly to not have it.
    Different things work for different sites.

    --
    Whitecrest Entertainment
    www.whitecrestent.com
    Whitecrest, Dec 18, 2003
    #9
  10. Otuatail

    Whitecrest Guest

    In article <xngEb.57224$>,
    says...
    > What if I want to right click and use the context menu to bookmark your
    > page? You have just lost me as a return visitor.


    Aside from my previous post, in this case, I completely agree with you.
    He is likely to piss off visitors tat try to right click on the page.

    > Oh, by the way, there is this rule: The desire to hide your source code from
    > anybody else is in inverse proportion to the value of that code to anybody
    > else.


    Right on the money


    > Finally, did it ever occur to you to search the history of this newsgoup?
    > This question comes up at least once a week and gives us lots of fun... Let
    > the flames begin.


    See my previous post....... ;-}

    --
    Whitecrest Entertainment
    www.whitecrestent.com
    Whitecrest, Dec 18, 2003
    #10
  11. Default User wrote:
    > Or the thing I use a lot since getting Mozilla, Open Link in New Tab.
    > Tabbed browsing is great, so it eally pisses me when someone monkeys
    > with the right click.


    I use my middle mouse button for that. It's less clicking.
    Leif K-Brooks, Dec 18, 2003
    #11
  12. Otuatail

    Default User Guest

    Leif K-Brooks wrote:
    >
    > Default User wrote:
    > > Or the thing I use a lot since getting Mozilla, Open Link in New Tab.
    > > Tabbed browsing is great, so it eally pisses me when someone monkeys
    > > with the right click.

    >
    > I use my middle mouse button for that. It's less clicking.


    My mouse doesn't have a middle button.



    Brian Rodenborn
    Default User, Dec 18, 2003
    #12
  13. Otuatail

    brucie Guest

    in post <news:>
    Otuatail said:

    > Can anyone tell me what code I use so that when someone right clicks on
    > a web page youi get the Whats this message instead of a popup window
    > for view source or save image.


    if you attempt to disable my thumb and middle ring finger i'm going to
    charge you with assault or break your arm, whichever at the time will
    give me the greatest satisfaction, i think that is only fair.

    santa *is* bringing me this for xmas or hes a dead man:
    http://www.fingerworks.com/lp_product.html then my "right click" will

    --
    brucie
    19/December/2003 06:07:57 am kilo
    brucie, Dec 18, 2003
    #13
  14. Otuatail

    Steve R. Guest

    Default User wrote in message ...
    > My mouse doesn't have a middle button.


    That's 'cos you're a *Default User* :~)

    Did you really configure your Usenet name to be that ?
    Or was it just left as *Default User* ?

    Steve.
    Steve R., Dec 18, 2003
    #14
  15. Otuatail

    Default User Guest

    "Steve R." wrote:
    >
    > Default User wrote in message ...
    > > My mouse doesn't have a middle button.

    >
    > That's 'cos you're a *Default User* :~)
    >
    > Did you really configure your Usenet name to be that ?
    > Or was it just left as *Default User* ?



    Left it that way. It started as a reminder to myself that I needed to
    get a better newsreader than Netscape. Now it's been so long that it's
    become my identity.



    Brian Rodenborn
    Default User, Dec 18, 2003
    #15
  16. Otuatail

    George Self Guest

    Otuatail wrote:

    > Can anyone tell me what code I use so that when someone right clicks on
    > a web page youi get the Whats this message instead of a popup window
    > for view source or save image.
    >
    > Paul


    If you have some sort of code to hide you might try using a server-side
    scripting language (like PHP). That code is stripped from the file before
    it's served to your visitor.

    --George
    George Self, Dec 18, 2003
    #16
  17. Otuatail

    rf Guest

    "George Self" <> wrote in message
    news:z2qEb.30097$BQ5.11499@fed1read03...
    > Otuatail wrote:
    >
    > > Can anyone tell me what code I use so that when someone right clicks on
    > > a web page youi get the Whats this message instead of a popup window
    > > for view source or save image.
    > >
    > > Paul

    >
    > If you have some sort of code to hide you might try using a server-side
    > scripting language (like PHP). That code is stripped from the file before
    > it's served to your visitor.


    Er, yes. However the HTML is still there, as are the images. You can not
    obfuscate an image with PHP :)

    Cheers
    Richard.
    rf, Dec 18, 2003
    #17
  18. George Self wrote:
    > If you have some sort of code to hide you might try using a server-side
    > scripting language (like PHP). That code is stripped from the file before
    > it's served to your visitor.


    He's talking about hiding HTML, which doesn't do logic. PHP still
    generates HTML (or something else), and the resulting HTML is still visible.
    Leif K-Brooks, Dec 18, 2003
    #18
  19. Leif K-Brooks, Dec 18, 2003
    #19
  20. Otuatail

    brucie Guest

    in post <news:RRqEb.885$7%>
    Leif K-Brooks said:

    >> santa *is* bringing me this for xmas or hes a dead man:
    >> http://www.fingerworks.com/lp_product.html


    > If Santa brings you that, his sleigh will be hijacked by me.


    i haven't actually given him my final decision yet. the split layout
    concerns me. i think i've spent too many years on a "normal" keyboard.
    i'm thinking of getting a cheap split keyboard (they're only $20) to see
    if i can get used to it first.

    --
    brucie
    19/December/2003 09:37:18 am kilo
    brucie, Dec 18, 2003
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TkcgV0VJIENIVU5H?=

    Unable to view ASP .NET page due to proxy server and firewall

    =?Utf-8?B?TkcgV0VJIENIVU5H?=, Jul 29, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    2,641
    =?Utf-8?B?TkcgV0VJIENIVU5H?=
    Jul 30, 2005
  2. Parthiv Joshi
    Replies:
    1
    Views:
    632
    Samuel L Matzen
    Jul 6, 2004
  3. andspal

    Updates in Design view not moved to Source view

    andspal, Nov 2, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    165
    andspal
    Nov 2, 2006
  4. Jenny
    Replies:
    3
    Views:
    241
    Dag Sunde
    Dec 17, 2004
  5. Jake Barnes
    Replies:
    6
    Views:
    374
    9.co.uk
    Feb 8, 2006
Loading...

Share This Page