Have a photography site that I want to prevent image copying from. How can I disable the save image menu that pops up on an iPhone when you hold down your finger on an image?
Try:
document.body.style.webkitTouchCallout='none';
As an aside is it really worth it? Hacks like this do impact user expectations, and your image is on the internet, anyone who wants it can easily get it regardless of whether a context menu has been disabled in the browser they're using.
The solution with CSS (-webkit-touch-callout: none;
) as @alex tells, works fine with iOS7 Safari. Thanks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With