User Agents

Web browsers and everyday web tech, explained

Can Websites Detect Screenshots? How It Works

· 6 min read · Browsers

In this article
  1. Why Screenshot Detection Is Technically Impossible
  2. What Websites Can Actually Detect
  3. How Screen Recording Detection Works (The Only Real Detection)
  4. Common Misconceptions About Screenshot Detection
  5. Why Some Sites Try to Block Screenshots Anyway
  6. How to Protect Your Content Without Screenshot Detection
  7. Frequently Asked Questions

No, websites cannot detect when you take a screenshot of their content. The browser does not expose any screenshot event to the page, and there is no JavaScript API or HTML attribute that tells a site that a screenshot occurred. However, websites can detect certain screen-capture behaviors, like the use of built-in screen recording on some platforms, and they can use technical measures to make screenshots less useful, such as blocking right-click or overlaying watermarks.

Why Screenshot Detection Is Technically Impossible

When you take a screenshot on your device (phone, tablet, or computer), the operating system captures the pixels currently displayed on your screen. This happens outside the browser's control. The browser only knows what it renders; it has no access to the OS-level screen capture function. There is no event like screenshotTaken in the HTML or JavaScript specifications. Even if a website wanted to detect it, there is no standard way to receive a notification from the OS that a screenshot was taken.

Some mobile operating systems (like iOS and Android) do notify apps when a screenshot is taken, but that notification is only available to native apps that request special permissions. Browsers do not have that permission. Even if a browser wanted to expose it, doing so would be a massive privacy violation—every website would know when you capture anything on your screen, including content unrelated to that site. For this reason, browser vendors have not implemented any such API.

What Websites Can Actually Detect

While direct screenshot detection is impossible, websites can detect related actions:

  • Screen recording: On some browsers (notably Chrome and Edge), a site can detect if the current tab is being recorded using the getDisplayMedia() API. This is used for video conferencing and screen-sharing. The browser shows a persistent indicator (like a red dot) and can fire an event if the recording stops. However, this only works for recording, not static screenshots.
  • Copy/paste of content: Websites can detect when you copy text or images from their page using the copy event. They can then alter the clipboard content, add attribution, or block copying altogether. This is not screenshot detection, but it is a common anti-piracy measure.
  • Right-click blocking: Many sites disable the context menu to prevent “Save Image As” or “Copy Image.” This does not stop screenshots, but it makes it slightly harder to grab images directly.
  • Watermarking and dynamic overlays: Some streaming services (like Netflix) overlay a semi-transparent watermark with your account info on the video. If you screenshot, the watermark appears in the image, allowing the service to trace the leak back to you. This is a deterrent, not detection.

How Screen Recording Detection Works (The Only Real Detection)

The getDisplayMedia() API is the only way a website can know that you are capturing the screen. When you share your screen, the browser asks for permission. The site then receives a stream of the screen content. During the capture, the browser shows a visible indicator (like a red “Recording” bar or a camera icon). The site can listen for the ended event on the stream to know when you stop sharing. But this is only for live screen sharing, not for taking a screenshot. If you take a screenshot while the tab is being recorded, the site does not know about the screenshot itself.

There is also a lesser-known API called beforeunload that some sites use to warn you if you try to leave the page. It has nothing to do with screenshots, but it is sometimes confused with detection because it can trigger when you switch tabs or close the window.

Common Misconceptions About Screenshot Detection

Misconception: “Websites can see my screenshots in my gallery.” No. Websites cannot access your device’s file system or photos. They only see what you upload. If you take a screenshot and then upload it, the site sees the image, but it cannot tell it was a screenshot unless it analyzes the metadata (like device model or resolution). Some sites (like social media) strip metadata, so even that is not reliable.

Misconception: “Incognito mode prevents screenshot detection.” Incognito mode does not affect screenshot detection because there is no detection to begin with. It only prevents local browsing history from being saved.

Misconception: “Sites can detect screenshots via JavaScript.” There is no JavaScript API for screenshots. Some developers have tried to detect the blur event when you switch apps, but that is not reliable and does not confirm a screenshot.

Why Some Sites Try to Block Screenshots Anyway

Even though they cannot detect screenshots, many sites still try to prevent them. This is common in:

  • Streaming services (Netflix, Hulu, Disney+) – they use DRM (Digital Rights Management) to encrypt video streams. The video is rendered in a protected pipeline, so a screenshot may capture a black screen or a blank area where the video should be. This is not detection; it is prevention.
  • Banking apps – some banks disable screenshots in their native apps by using a flag in the app code. On Android, this is done with FLAG_SECURE. On iOS, it is not possible to fully disable screenshots, but apps can detect them and warn the user.
  • E-books and document viewers – some PDF viewers disable copy/paste and right-click, but screenshots still work.

These measures are not about detection; they are about making screenshots less useful or less likely to be taken.

How to Protect Your Content Without Screenshot Detection

If you are a website owner and want to protect your content, you have several options that do not rely on detecting screenshots:

  1. Watermark your images and videos with your brand or user ID. This does not stop screenshots but helps you trace leaks.
  2. Disable right-click and text selection to make it harder to copy-paste content. Use CSS like user-select: none and JavaScript to prevent context menus.
  3. Use DRM for video if you stream premium content. This requires a service like Widevine or FairPlay.
  4. Add a dynamic overlay that changes with time or user session, so a screenshot becomes less useful.
  5. Monitor your content online using reverse image search or plagiarism tools to find unauthorized copies.

Frequently Asked Questions

Can a website detect if I screenshot a story on Instagram or Snapchat?

Snapchat and Instagram are native apps, not websites. They can detect screenshots because they have special permissions on the operating system. On iOS, apps can be notified when a screenshot is taken if they request that permission. On Android, apps can use the FLAG_SECURE to block screenshots, but they cannot detect them unless they use a workaround like monitoring the screen state. Websites, however, cannot do this.

Does incognito mode hide my screenshots from websites?

No, incognito mode only stops the browser from saving your history. It does not affect any website’s ability to detect screenshots (which is none) or to see your activity. The website still knows you visited, and if you log in, it knows who you are.

Can a website detect if I use a screen reader or assistive technology?

Websites can detect some assistive technologies via the accessibility API, but this is unrelated to screenshots. They cannot detect a screen reader specifically, but they can see if the user has certain accessibility features enabled, like high contrast mode. This is not used for screenshot detection.

Is there any way to take a screenshot without the website knowing?

Yes, every screenshot is taken without the website knowing. The only exception is if you are using a screen recording tool that triggers the getDisplayMedia permission, which the site can see. But a simple screenshot (PrtScn, Cmd+Shift+4, or the phone button combo) is invisible to the site.

Why do some websites show a black screen when I screenshot a video?

This is due to DRM (Digital Rights Management). The video is encrypted and rendered in a secure path that the OS cannot capture. When you take a screenshot, the protected area appears black or blank. This is not detection; it is a prevention mechanism built into the browser and the video player.