可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
Well, i have a web page where i am displaying few images. But my problem is that i don't want user to download or save those images. I can apply watermark to those images but that is alternative option. I can also disable right click but what if user saves the page?
Any alternative solution will also do?
Hope this question is clear?
回答1:
If the user can see the image, it's already on his computer. Saving it to a file or copying it to the clipboard is trivial and cannot be disabled in any reliable way.
If you want to keep control over the image, don't put it on the internet.
Watermarking is the best you can do.
回答2:
If the user can view the image there is no way you can stop him to save it, because at that point you have already sent him to file.
You can implement some pseudo-protection code such as anti Right-Click to "block" the saving, but overall it's just annoying to user of your website and it's always possible to go around it.
If you don't want your image to be propagated, watermark them or don't publish them.
回答3:
Porn website, eh?
Well, you cannot prevent it. You can screw Windows and IE users with a Javascript trick, but as said before, that's easy to disable. You can't stop users from saving of the whole page either. People can also just make screenshot, cut and resave. All resources available via URLs are locateable and can be downloaded.
There's one option to frustrate downloading of images though: automatically slice it. If the image is 800x600 pixel, you could split it into a hundred(?) 80x60 smaller graphics. That would make reassembling slightly more difficult. But also turn the rendering slightly unrealiable.
回答4:
if you are using Apache server, you can disable accessing the image through absolute url
the images can be access only with relative url with this htaccess code :
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]
in addition, disable the right click context using JavaScript, and add a watermark to protect the copy rights
this will reduce the chance of saving the images
回答5:
There always seem to be ways to circumvent this, so you shouldn't even bother. I have never been unable to break this type of blocking functionality. If applicable, it's probably better to watermark your images with your name, date and a copyright symbol or (C).
回答6:
There's no absolute solution to prevent user from downloading your image. If you publish image in the web,just assume that somebody can copy it. Whatever your solution, in the end user can take a screen shot anyway.
回答7:
I've seen a few web pages that put a transparent single-pixel .gif as an overlay across the "main" image that they're displaying, so that when you right-click and save you only save the single-pixel image. I'm not sure of the exact HTML for that, but there are a few obvious ways to do it.
(This, like the other tricks, is not particularly difficult to circumvent, but it does at least add an annoyance factor that will block most people.)
回答8:
As mention in all the answers, there is no way to prevent users from saving the image, however you can try to make it hard for a user to do it.
although this is not good performance, you can split the image into many small pieces, making it harder (but not at all impossible) to save them and join them.
回答9:
Prevent users from downloading images it's a waste of time because even if they cannot download the image, they always could do an screenshot :-(
回答10:
There are so many ways to download images from website, so whatever you do at the end of the day someone is going to download it.
回答11:
Try to use flash to load your image, use flash to decode your encoded images. And this still can not prevent user to take a screen capture.