• Right Click prohibited on websites?

    Home » Forums » Developers, developers, developers » Web design and development » Right Click prohibited on websites?

    Author
    Topic
    #402268

    If you use View>Source for the page, you probably willl find some JavaScript that intercepts the right-click keystroke.

    Viewing 1 reply thread
    Author
    Replies
    • #798762

      Edited by WyllyWylly to add URL code. See the Quick Guide.[/i][/size] smile

      Hello,

      If you goto the website:

      http://www.msproject.com[/url%5D

      And right-click on any of the graphics on the right-side, you’ll see the message as per the attached graphic.

      How can I do that on a personal website?

      Bob.

      • #798939

        Exactly as Jefferson says. Have a look at this page for some code that you can copy and paste into your site.

      • #798940

        Exactly as Jefferson says. Have a look at this page for some code that you can copy and paste into your site.

      • #803242

        Keep in mind that disabling right clicks will not stop a determined user; you can always view the source code of a page. From there, a user could determine where the image or other object lives on the server and download it anyway (not to mention that it will be in the browser cache as well).

        • #804994

          You don’t even need to view the source, simply tab over to it, and hit SHIFT+F10, same as a right click, but I’ve not seen the JavaScript most people use stop that. Have you seen people disabling the keyboard shortcut as well?

          TIA

          • #805006

            No, but actually I have never attempted to use the Shift+F10 shortcut either. By the time you tab to the right place, you could have already opened the View – Source option.

            That’s an interesting point, though, the script intercepts mouse activity, not the keyboard equivalent. I would wager that most folks using that script got it canned from somewhere, and the original author was not even aware that you could use Shift+F10!

            • #805084

              True with the view source, but you really don’t even need that. Do a Save As Web page complete, then get all the images at once, and not have to mess with shortcuts or viewing the source.

              -T

            • #805085

              True with the view source, but you really don’t even need that. Do a Save As Web page complete, then get all the images at once, and not have to mess with shortcuts or viewing the source.

              -T

          • #805007

            No, but actually I have never attempted to use the Shift+F10 shortcut either. By the time you tab to the right place, you could have already opened the View – Source option.

            That’s an interesting point, though, the script intercepts mouse activity, not the keyboard equivalent. I would wager that most folks using that script got it canned from somewhere, and the original author was not even aware that you could use Shift+F10!

          • #805059

            You might defeat this with an onFocus() event handler that immediate removes focus, but that’s just an untested theory. grin

            • #805071

              Sounds like it would make it difficult to use an element that needed the focus if someone did something like that. I see people that think it need to turn off menus and toolbars in a browser to hide URLs think it neat, but they forget about hitting F-11 to go full screen, and then there’s an address bar showing the URL they were trying to hide. One would also need to be careful and use the Onfocus event in those elements surrounding an image etc. that doesn’t support that event.

              FWIW

            • #805072

              Sounds like it would make it difficult to use an element that needed the focus if someone did something like that. I see people that think it need to turn off menus and toolbars in a browser to hide URLs think it neat, but they forget about hitting F-11 to go full screen, and then there’s an address bar showing the URL they were trying to hide. One would also need to be careful and use the Onfocus event in those elements surrounding an image etc. that doesn’t support that event.

              FWIW

          • #805060

            You might defeat this with an onFocus() event handler that immediate removes focus, but that’s just an untested theory. grin

          • #805089

            Good call Tom…
            I remembered that my husband, wolfman, had used this trick before. I checked some of the sites he’s created lately and found that this site danimara.com used the disable right-click trick. I tried your SHIFT+F10 move and it worked. Neat trick.
            have fun

            • #805093

              Why do people call it a neat trick? Developers at a potential vendor were shocked when they heard me tell how I got into their disabled links. Just look up keyboard shortcuts in most any Windows version’s Help files, and you’ll find listed all the Windows shortcuts. Don’t forget the built-in Application Key on Microsoft Natural Keyboards and clones… good grief it’s so well documented…

            • #805108

              “Neat trick” is an expression of joy at discovering something new and useful that saves time or energy, and you probably should interpret it as a compliment. smile From your perspective, you might simply be pointing out the obvious, but most people do not have the time to read the documentation for Internet Explorer or even for Windows. It’s helpful to be reminded of useful ones that we might never have seen a use for and therefore let drift from memory.

            • #805159

              I know what neat trick means. It’s simply very bad design with all the keyboards out there now with a single key dedicated to shortcut menu, and I’m sorely disappointed to run into vendors that think the disabling of the mouse is a solution to poor security, I’ll not go in to details nor mention vendors. It doesn’t take much to find the app key on a keyboard sporting it. From my perspective, I’ve run into a few vendors now, that appear to be really naive startups, so I don’t think it’s a neat trick. I think it’s a sad state of development.

            • #805201

              We all have our areas of expertise. I would wager that most folks are not aware of the multitude of keyboard shortcuts that exist, and even those that are aware of them appreciate another nugget of knowledge. If you think about this logically, disabling mouse clicks on a web page will thwart many a user simply because they are not aware of the many workarounds.

              “Sad state of development” could apply to many things, computer technologies being just one.

            • #805514

              When you’re dealing with a potential vendor that’s creating something for people involved with cybercrime fighting, and they use a script to disable a right-click of the mouse, as almost the sole level of protection, I find it unconscionable and a very sad state of development, that’s why I made my points. Needless to say I’ll not ever work with the vendor again.

            • #807070

              Disabling right-click will thwart the novice image stealer… however, if there is a will, there IS a way, no matter what you do to the page to prevent it. If you’re that worried about people stealing images and the like, then a password protected section should be implemented and only those you trust should have the password… and even then, the ONLY way to stop anyone from taking your stuff off a website is to not post it at all.
              have fun

            • #807320

              Actually….

              Using Flash to distribute content makes it MUCH more difficult for anyone to take images. Of course, anyone who is determined enough can use a SWF decompiler. But I doubt most “image-borrowers” will have that level of sophistication.

            • #832327

              … yet …

            • #832328

              … yet …

            • #807321

              Actually….

              Using Flash to distribute content makes it MUCH more difficult for anyone to take images. Of course, anyone who is determined enough can use a SWF decompiler. But I doubt most “image-borrowers” will have that level of sophistication.

            • #807071

              Disabling right-click will thwart the novice image stealer… however, if there is a will, there IS a way, no matter what you do to the page to prevent it. If you’re that worried about people stealing images and the like, then a password protected section should be implemented and only those you trust should have the password… and even then, the ONLY way to stop anyone from taking your stuff off a website is to not post it at all.
              have fun

            • #805515

              When you’re dealing with a potential vendor that’s creating something for people involved with cybercrime fighting, and they use a script to disable a right-click of the mouse, as almost the sole level of protection, I find it unconscionable and a very sad state of development, that’s why I made my points. Needless to say I’ll not ever work with the vendor again.

            • #805202

              We all have our areas of expertise. I would wager that most folks are not aware of the multitude of keyboard shortcuts that exist, and even those that are aware of them appreciate another nugget of knowledge. If you think about this logically, disabling mouse clicks on a web page will thwart many a user simply because they are not aware of the many workarounds.

              “Sad state of development” could apply to many things, computer technologies being just one.

            • #805160

              I know what neat trick means. It’s simply very bad design with all the keyboards out there now with a single key dedicated to shortcut menu, and I’m sorely disappointed to run into vendors that think the disabling of the mouse is a solution to poor security, I’ll not go in to details nor mention vendors. It doesn’t take much to find the app key on a keyboard sporting it. From my perspective, I’ve run into a few vendors now, that appear to be really naive startups, so I don’t think it’s a neat trick. I think it’s a sad state of development.

            • #805109

              “Neat trick” is an expression of joy at discovering something new and useful that saves time or energy, and you probably should interpret it as a compliment. smile From your perspective, you might simply be pointing out the obvious, but most people do not have the time to read the documentation for Internet Explorer or even for Windows. It’s helpful to be reminded of useful ones that we might never have seen a use for and therefore let drift from memory.

            • #805094

              Why do people call it a neat trick? Developers at a potential vendor were shocked when they heard me tell how I got into their disabled links. Just look up keyboard shortcuts in most any Windows version’s Help files, and you’ll find listed all the Windows shortcuts. Don’t forget the built-in Application Key on Microsoft Natural Keyboards and clones… good grief it’s so well documented…

          • #805090

            Good call Tom…
            I remembered that my husband, wolfman, had used this trick before. I checked some of the sites he’s created lately and found that this site danimara.com used the disable right-click trick. I tried your SHIFT+F10 move and it worked. Neat trick.
            have fun

        • #804995

          You don’t even need to view the source, simply tab over to it, and hit SHIFT+F10, same as a right click, but I’ve not seen the JavaScript most people use stop that. Have you seen people disabling the keyboard shortcut as well?

          TIA

      • #803243

        Keep in mind that disabling right clicks will not stop a determined user; you can always view the source code of a page. From there, a user could determine where the image or other object lives on the server and download it anyway (not to mention that it will be in the browser cache as well).

    • #798763

      Edited by WyllyWylly to add URL code. See the Quick Guide.[/i][/size] smile

      Hello,

      If you goto the website:

      http://www.msproject.com[/url%5D

      And right-click on any of the graphics on the right-side, you’ll see the message as per the attached graphic.

      How can I do that on a personal website?

      Bob.

    Viewing 1 reply thread
    Reply To: Right Click prohibited on websites?

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: