Do you ever get that “Do you want to allow this web page to access your clipboard?” pop-up message in Windows Explorer?
This happens when a script on the page executes a sequence like:
var s=”new clipboard text!”;
window.clipboardData.setData(‘Text’, s );
The pop-up is a security enhancement added to Internet Explorer starting with IE 7. There is a setting under Tools/Internet Options/Security that lets you disable the warning, but the default setting is “Prompt” and I highly recommend that you leave it that way.
Why? Because there are web sites that will read the contents of your clipboard to learn personal information (who among us hasn’t copied-and-pasted a password at one time or another?) and there are many websites that will try to delete the contents of your clipboard (e.g., as a really stupid attempt to prevent you from copying images) and, worst of all, there are known exploits involving drag-and-drop operations that can get your computer infected with a virus or Trojan horse.
So leaving the setting at Prompt will warn you that something nefarious is going on in some script on that page, and you can cancel the operation and avoid that site in the future.
There are times when allowing a page to access your clipboard can be convenient like running scripts from a trusted site.
Fortunately, it is possible to set IE with specific security settings when accessing specific websites; all you need to do is include that particular site as one of your trusted sites, and then modify the security settings for trusted sites.
1. Navigate to any web page on the trusted site
2. Select the IE menu item Tools/Internet Options
3. Click the Security tab
4. Click the Trusted Sites zone (it has a green checkmark icon)
5. Click Sites
6. Verify that the “Add this website” box has the domain name of the site you trust.
7. If the “Require server verification for (https) for all sites on this zone” checkbox is checked, clear it.
8. Click Add and then Close
That site is now trusted, but you also need to change the settings for trusted sites. We are going to change just the one setting that relates to clipboard access.
1) Back in the Internet Options/Security dialog, verify that Trusted Sites is still highlighted.
2) Click the Custom level… button.
3) Scroll down to the Scripting section near the bottom (Tip: press S a few times).
4) Change Allow Programmatic clipboard access to Enable
5) Click OK and also OK the Internet Options dialog.
That’s all there is to it. Now when you are viewing any page on that site, you will not be prompted with the “Do you want to allow this web page to access your clipboard?” warning.
Obvious, But Obligatory Warning:
!!! If you don’t trust a site, don’t put it on your Trusted Sites list !!!