1

A friend of mine asked me if it is possible to "make something" to avoid someone stealing her photos from her blog posts. I told her that we can try some options but at the end there's always a way to get the pictures, and that some people even take screen shots so they can have the images.

Then I asked myself if the screen capture exists as an event so you can catch it using js/jQuery and hide the image. I have searched for a while now but still can't find an answer.

Is this possible?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
carlosherrera
  • 177
  • 2
  • 11

3 Answers3

3

Find out in the ASCII table which is the screenshot key on the keyboard, capture it via javascript and return false.

That is a way to do it, but in the end, there is always a way to bypass that. There is even software to take those screenshots.

For example on windows 8, if you press the Windows key plus the print screen, it will automatically save the screenshot on a folder inside your pictures folder.

It's pretty much a lost battle.

CodeTrooper
  • 1,890
  • 6
  • 32
  • 54
1

No, it's not possible because a screen capture event belongs to the OS, not to the browser so JavaScript wouldn't be aware of it. What you could be able to do is detect the key strokes associated to the screen capture and hiding the image if it happens.

It's still trivial, because anyone could take a picture to the monitor screen.

federico-t
  • 12,014
  • 19
  • 67
  • 111
0

As the other answered, it's pretty impossible to avoid that: if something is on a computer's screen, then it is on that computer, somehow. At last, you can always take a screnshot of the screen.

The only solution, if possible, would be to use a watermark.

ocramot
  • 1,361
  • 28
  • 55