当用户使用javascript点击视图源时如何保护img src路径? [英] how to secure img src path when user clicks on view source using javascript?

查看:91
本文介绍了当用户使用javascript点击视图源时如何保护img src路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果在点击inspect元素时保护图像的src路径,以便用户不应该了解实际的src路径...请帮助我解决方案,它应该用javascript完成,只有其他标签不应该使用。

How to secure the src path of the image when clicks on inspect element so that user should not get to know about the actual src path..please help me with the solution and it should be done with javascript only no other tags should be used.

推荐答案

您可以使用图像源的相对路径而不是绝对路径。

其次,您可以访问控制实际图像文件夹,而不是模糊它的路径,以便即使用户能够看到路径,他/她将无法做任何事情。
You can use relative path for image source instead of absolute path.
Secondly, you can access control the actual image folder instead of obscuring it's path so that even if user is able to see the path, he/she won't be able to do anything with it.


这篇关于当用户使用javascript点击视图源时如何保护img src路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆