是否可以防止从我的网站保存图像?

时间:2021-07-06 20:07:36

I have restricted the right click option in my web page, but in IE it shows icons to Save Image, Print, Mail etc . I want to remove all of these. Is this possible?

我限制了我的网页中的右键单击选项,但在IE中它显示了保存图像,打印,邮件等图标。我想删除所有这些。这可能吗?

10 个解决方案

#1


23  

It seems like everyone else who answered here didn’t read the question.

似乎所有在这里回答的人都没有读过这个问题。

I have restricted right clicking option in my web page , But IN IE it shows Icons to Save Image, print , mail etc . I want to remove all of these . IS it possible ??

我在我的网页中限制了右键单击选项,但是在IE中它显示了图标以保存图像,打印,邮件等。我想删除所有这些。可能吗 ??

Yes, it is possible to remove these icons. Just put the following in the <head> of your document.

是的,可以删除这些图标。只需将以下内容放在文档的中即可。

<meta http-equiv="imagetoolbar" content="no" />

As mentioned in the other answers, users will still be able to get the images if they really want to, no matter how hard you try to prevent it. If you don’t want the images to be copied, you shouldn’t use them on a website.

正如其他答案中所提到的,无论你多么努力地阻止它,用户仍然可以获得他们真正想要的图像。如果您不希望复制图像,则不应在网站上使用它们。

#2


6  

It sounds like you're talking about the Image Toolbar in Internet Explorer. You can disable it with this code:

听起来你在谈论Internet Explorer中的图像工具栏。您可以使用以下代码禁用它:

<html>
<head>
<meta http-equiv="imagetoolbar" content="no" />
</head>

</html>

Or, directly applied to an image:

或者,直接应用于图像:

<img src="test.gif" galleryimg="no" />

#3


5  

No it's not possible. The user can see the image in the browser and thus the browser (and the user) has a copy. You can try and restrict that with nasty (and ill-advised) right-click JS hacks and the like but ultimately if you send something to someone to see or read, what they do with it is beyond your control when you don't control the device they're using.

不,这是不可能的。用户可以在浏览器中看到图像,因此浏览器(和用户)具有副本。您可以尝试通过恶意(和不明智的)右键单击JS黑客等来限制它,但最终如果您向某人发送内容以查看或阅读,当您不控制时,他们使用它做什么是您无法控制的他们正在使用的设备。

#4


3  

You can only do so much to prevent some users. To be near 100% foolproof, it's probably impossible. Even if you packaged the images in say, flash, java applet, it doesn't stop users from doing screencapture too.

你只能做很多事情来阻止一些用户。要接近100%万无一失,这可能是不可能的。即使您将图像打包在say,flash,java applet中,它也不会阻止用户进行屏幕捕获。

There are few passive alternatives, e.g. using watermarks, putting up discalimers/warnings.

几乎没有被动的替代方案,例如使用水印,贴上discalimers / warnings。

Here are some related SO posts:
How to disable right-click save on one specific image only
Disable “Save Target As” option in the right click menu
Prevent Save As Functionality

以下是一些相关的SO帖子:如何禁用右键单击保存在一个特定图像上仅在右键单击菜单中禁用“目标另存为”选项防止另存为功能

#5


2  

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 :

如果您使用的是Apache服务器,则可以通过绝对URL禁用访问图像,只有使用此htaccess代码的相对URL才能访问图像:

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

此外,使用JavaScript禁用右键单击上下文,并添加水印以保护复制权,这将减少保存图像的机会

#6


1  

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 :-(

防止用户下载图像是浪费时间,因为即使他们无法下载图像,他们总是可以做截图:-(

#7


0  

You cannot prevent the downloading of your images. Just by viewing them, the browser caches them.

您无法阻止下载图像。只需查看它们,浏览器就可以缓存它们。

#8


0  

If the browser can get it, then the user can somehow get it.

如果浏览器可以获得它,那么用户可以以某种方式获得它。

You could investigate using an HTML5 canvas or even (gasp) pixelized tables to render client-side.

您可以使用HTML5画布或甚至(喘气)像素化表来调查客户端。

#9


0  

.show_IMAGE
{
   background-position : 0 -100px;
   background-image : url('/images/flower.png');
   background-repeat : no-repeat;width:50px;height:50px;
} 

and add this class to DIV

并将此类添加到DIV

< div class="show_IMAGE"></ div>

you cannot copy the image alone. if you get image from CSS.

你不能单独复制图像。如果你从CSS获得图像。

#10


0  

You may try following steps:

您可以尝试以下步骤:

  • Disable right click function on your website.
  • 禁用您网站上的右键单击功能。

  • Disable image dragging on the image you want draggable="false"
  • 禁用图像拖动您想要的图像draggable =“false”

Now your website is image theft protected!

现在您的网站受到图像盗窃保护!

#1


23  

It seems like everyone else who answered here didn’t read the question.

似乎所有在这里回答的人都没有读过这个问题。

I have restricted right clicking option in my web page , But IN IE it shows Icons to Save Image, print , mail etc . I want to remove all of these . IS it possible ??

我在我的网页中限制了右键单击选项,但是在IE中它显示了图标以保存图像,打印,邮件等。我想删除所有这些。可能吗 ??

Yes, it is possible to remove these icons. Just put the following in the <head> of your document.

是的,可以删除这些图标。只需将以下内容放在文档的中即可。

<meta http-equiv="imagetoolbar" content="no" />

As mentioned in the other answers, users will still be able to get the images if they really want to, no matter how hard you try to prevent it. If you don’t want the images to be copied, you shouldn’t use them on a website.

正如其他答案中所提到的,无论你多么努力地阻止它,用户仍然可以获得他们真正想要的图像。如果您不希望复制图像,则不应在网站上使用它们。

#2


6  

It sounds like you're talking about the Image Toolbar in Internet Explorer. You can disable it with this code:

听起来你在谈论Internet Explorer中的图像工具栏。您可以使用以下代码禁用它:

<html>
<head>
<meta http-equiv="imagetoolbar" content="no" />
</head>

</html>

Or, directly applied to an image:

或者,直接应用于图像:

<img src="test.gif" galleryimg="no" />

#3


5  

No it's not possible. The user can see the image in the browser and thus the browser (and the user) has a copy. You can try and restrict that with nasty (and ill-advised) right-click JS hacks and the like but ultimately if you send something to someone to see or read, what they do with it is beyond your control when you don't control the device they're using.

不,这是不可能的。用户可以在浏览器中看到图像,因此浏览器(和用户)具有副本。您可以尝试通过恶意(和不明智的)右键单击JS黑客等来限制它,但最终如果您向某人发送内容以查看或阅读,当您不控制时,他们使用它做什么是您无法控制的他们正在使用的设备。

#4


3  

You can only do so much to prevent some users. To be near 100% foolproof, it's probably impossible. Even if you packaged the images in say, flash, java applet, it doesn't stop users from doing screencapture too.

你只能做很多事情来阻止一些用户。要接近100%万无一失,这可能是不可能的。即使您将图像打包在say,flash,java applet中,它也不会阻止用户进行屏幕捕获。

There are few passive alternatives, e.g. using watermarks, putting up discalimers/warnings.

几乎没有被动的替代方案,例如使用水印,贴上discalimers / warnings。

Here are some related SO posts:
How to disable right-click save on one specific image only
Disable “Save Target As” option in the right click menu
Prevent Save As Functionality

以下是一些相关的SO帖子:如何禁用右键单击保存在一个特定图像上仅在右键单击菜单中禁用“目标另存为”选项防止另存为功能

#5


2  

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 :

如果您使用的是Apache服务器,则可以通过绝对URL禁用访问图像,只有使用此htaccess代码的相对URL才能访问图像:

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

此外,使用JavaScript禁用右键单击上下文,并添加水印以保护复制权,这将减少保存图像的机会

#6


1  

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 :-(

防止用户下载图像是浪费时间,因为即使他们无法下载图像,他们总是可以做截图:-(

#7


0  

You cannot prevent the downloading of your images. Just by viewing them, the browser caches them.

您无法阻止下载图像。只需查看它们,浏览器就可以缓存它们。

#8


0  

If the browser can get it, then the user can somehow get it.

如果浏览器可以获得它,那么用户可以以某种方式获得它。

You could investigate using an HTML5 canvas or even (gasp) pixelized tables to render client-side.

您可以使用HTML5画布或甚至(喘气)像素化表来调查客户端。

#9


0  

.show_IMAGE
{
   background-position : 0 -100px;
   background-image : url('/images/flower.png');
   background-repeat : no-repeat;width:50px;height:50px;
} 

and add this class to DIV

并将此类添加到DIV

< div class="show_IMAGE"></ div>

you cannot copy the image alone. if you get image from CSS.

你不能单独复制图像。如果你从CSS获得图像。

#10


0  

You may try following steps:

您可以尝试以下步骤:

  • Disable right click function on your website.
  • 禁用您网站上的右键单击功能。

  • Disable image dragging on the image you want draggable="false"
  • 禁用图像拖动您想要的图像draggable =“false”

Now your website is image theft protected!

现在您的网站受到图像盗窃保护!