I have spent some time reading the back posts but I could not find the answer.
I want to stop people right clicking and downloading pictures and videos.
Has anyone got any resolution to this or just ideas would be welcome.
Thanks for reading
Simon
You cannot fully stop downloads, because anything viewable in a browser can be saved. You can make it harder with:
document.addEventListener('contextmenu', e => e.preventDefault());
Note: These only deter casual users. Screenshots or dev tools can still capture content.
For high-value media, combine watermarks, streaming, and low-res previews.
Yes you can also do this in CSS i think too Thank you @rakeshkj
To rap it up... you stop them even from viewing the source code transformed into html etc. of your webpage. view-source:yourwebpage
<script>
document.addEventListener('contextmenu', function(event) {
event.preventDefault();
alert("Right-click is disabled on this website.");
});
</script>
You can put it in the page header or if you want it across pages, use designer and templates.
Yes we need to stop downloads buddy, it been a request
Look, any developer who wants access to any page html output will know the howto's for example add view-source: in front of the url link, and can even clone the page etc.
But o yes, anything is doable and even to stop downloads from your site...
You cannot fully stop downloads, because anything viewable in a browser can be saved. You can make it harder with:
document.addEventListener('contextmenu', e => e.preventDefault());
Note: These only deter casual users. Screenshots or dev tools can still capture content.
For high-value media, combine watermarks, streaming, and low-res previews.
Yes you can also do this in CSS i think too Thank you @rakeshkj
To rap it up... you stop them even from viewing the source code transformed into html etc. of your webpage. view-source:yourwebpage
<script>
document.addEventListener('contextmenu', function(event) {
event.preventDefault();
alert("Right-click is disabled on this website.");
});
</script>
You can put it in the page header or if you want it across pages, use designer and templates.
Yes we need to stop downloads buddy, it been a request
Look, any developer who wants access to any page html output will know the howto's for example add view-source: in front of the url link, and can even clone the page etc.
But o yes, anything is doable and even to stop downloads from your site...