javascript - How to Prevent Screenshot for Responsive website? - Stack Overflow

I am creating a website, and facing some problem -I want to Prevent Screenshot in Website when it is t

I am creating a website, and facing some problem -
I want to Prevent Screenshot in Website when it is tested on Mobile Phone.
I used jQuery for Desktop view It's working fine but how to prevent in mobile

Is it possible to prevent screenshot?

 function copyToClipboard() {
  var aux = document.createElement("input");
  aux.setAttribute("value", "print screen disabled!");      
  document.body.appendChild(aux);
  aux.select();
  document.execCommand("copy");
  // Remove it from the body
  document.body.removeChild(aux);
  alert("Print screen disabled!");
}

I am creating a website, and facing some problem -
I want to Prevent Screenshot in Website when it is tested on Mobile Phone.
I used jQuery for Desktop view It's working fine but how to prevent in mobile

Is it possible to prevent screenshot?

 function copyToClipboard() {
  var aux = document.createElement("input");
  aux.setAttribute("value", "print screen disabled!");      
  document.body.appendChild(aux);
  aux.select();
  document.execCommand("copy");
  // Remove it from the body
  document.body.removeChild(aux);
  alert("Print screen disabled!");
}
Share edited Mar 7, 2019 at 5:25 Anjali Patel asked Mar 6, 2019 at 12:44 Anjali PatelAnjali Patel 8253 gold badges11 silver badges24 bronze badges 5
  • 8 I can take another phone and take a picture of my screen. If you do not want people to copy something, don't put it on the web – mplungjan Commented Mar 6, 2019 at 12:45
  • Short answer, nope, you can't prevent it. – Dave Commented Mar 6, 2019 at 12:50
  • Any reason why you want to prevent screenshot? – Sudharshan Nair Commented Mar 6, 2019 at 12:56
  • Its a requirement from my client @SudharshanNair – Anjali Patel Commented Mar 6, 2019 at 12:58
  • 1 @AnjaliPatel. Actually verify with client why screenshot should be restricted. – Sudharshan Nair Commented Mar 6, 2019 at 12:59
Add a ment  | 

1 Answer 1

Reset to default 4

No, it is not possible to prevent screenshots from mobile.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745060374a4608930.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信