gpt4 book ai didi

html - 禁止从 html 页面下载图像

转载 作者:行者123 更新时间:2023-12-03 09:21:11 25 4
gpt4 key购买 nike

假设有一个 html 页面包含一些图像。

我们希望禁止从用户端下载图像。

可能吗?

我是否需要使用 javascript或添加一些attributes<img>标签?

我当前的代码是

       <td><img src="images/handmade (1).jpg" class="img-responsive" alt="" /></td>

</tr>
</table>

有什么技术可以防止图像下载吗?

最佳答案

不,这是不可能的。此处说明:https://graphicdesign.stackexchange.com/a/39464/24086

For all intents and purposes, this is downright impossible. You can disable right click, but people can still view the source code of your page (by adding view-source: to the URL in Chrome, or just using a browser menu) and find the URL. You can use a CSS background-image instead of HTML , but people can still use their browser's inspector (F12 for most browsers) and find that element's CSS properties. You can engineer some crazy thing that you think will work, but at the end of the day, the user has to download the image in some way to see it. If the user is completely unable to download the image, he/she won't even be able to see it in the first place! No matter what you do, nothing will prevent a simple glance at a network traffic monitor or the "Network" tab of your favorite browser's developer tools.

关于html - 禁止从 html 页面下载图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30392467/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com