I am new here and new/Blank to code as well, . I am basically a web hoster and platform guy on Cloud, where i help my client to migrate their application to cloud,. So my field and expertise is on Infrastructure and platform level, not the applications and code, That is the brief intro of me,.
So, my Requirement is I want someone to help me on how to disable right click on a static page (HTML page), in step by step with the code and where and how to append in the page. All i know is it is with some script that does.
I would be very grateful if anyone could guide me through this.
My first question would have to be āWhy do you want to do this?ā Visitors expect their browsers to behave in certain ways, and removing part of the functionality can cause frustration.
If we understand the issue, we might be able to suggest a better solution.
The reason i want to disable is because I want to create a portfolio of myself so I do not want anyone to download my photo or any content in the page, that is the reason.
Itās not something Iāve ever used - or would ever use - so I canāt help you there. Itās possible to disable right-click using JavaScript, but if the visitor has JS disabled, that will have no effect. However, Iām sure somebody will be able to give you the code, if you think itās worth trying.
However, the only sure way to prevent copying of content is to not put it on-line in the first place. Your page has to be downloaded to a visitors computer in order for them to see it. You can make it more difficult for them to save images, but not impossible. Watermarking images might be another option.
Hmm,. Thanks again at-least for the suggestions.
I have come across some site who does that, you can have a look at this website they too have disabled the right click.(http://getintopc.com/)
The similar way I too want for my site.
Anyway, I take my chances someone maybe out there who can help me with my requirement.
Yes; that site is using JS to doisable right-click. If you temporarily disable JS in your browser, youāll see that right-click works just fine.
Iāve seen a site where the first time a visitor right-clicks, they are shown a pop-up asking them to respect the copyright of the site, but after that, the right-click functionality returns to normal. However, they no longer seem to be bothering with it, so I canāt show you it in action.
Okey,. I got it, As you said if the script is disable in the browser it will not take effect, that is okey,. But I just want to use the same in my site.
If you view the source of the page you linked to, you can see the javascript that they are using to prevent you from copying their code and content.
In fact you can then copy the code that prevents you copying their stuff and use it yourself.
Oh Yea,. I think you miss my intro,. I am not a coder bro,. I donāt understand if I even see it and what is what,. you will know my status and my need if you read my comment properly. need someone who can help me with the step by step procedure as well.
Anybody can view the page source for the page you linked to, and see the code thatās used to āpreventā copying. Then they can copy that very code and use it themselves. In other words, the script canāt prevent copying of anything, not even itself.
Yes, you can use that script (or similar), but the people most likely to try copying from your site for nefarious purposes will be undeterred by it, while genuine visitors are likely to be frustrated by the disabling of the right-click function.
It is a mute point anyways for I donāt even have to do right click on my iMac. I would just do command-shift-4 if I wanted to copy a picture badly enough.
People forget that anyone with a modern browser can download anything they want. For instance, one doesnāt need a ādownloadā button nor have the ability to right click on the page. People who fall for this trick arenāt usually tech savvy. So one of the ways that can bypass this ādisabling right clickā is just simply using modern browsers. In Firefox, you go to the Tools menu in the top bar. I donāt recall which sub menu comes after that, but thereās something like Page Info. And all you just have to do is click on the Media tab and thereās all the images straight from the current page. You donāt need a ādownloadā button in order to download anything.
@Pepster64 another way would be opening up the Terminal in both Linux and Mac and typing in
wget http://......
Like @coothead said. If you donāt want people downloading your images, donāt put it up on the Internet. I guess one way to make a copyright infringement on it is to write or make some kind of watermark that is very noticeable and if someone removes it, it would ruin the image. Thatās most likely your best bet right now.
As I said, itās not something I would ever use, but a quick search reveals there are a number of tutorials available if you want to do this. For example, there are three different methods here:
Pick one to try and post back if you need more help.