Granting JavaScript access to the clipboard

Some web sites can benefit from having access to the copy/paste functionality of your system's clipboard. Examples include:

  • Those that use rich text editors (such as a web mail or weblog posting site).
  • Those that copy useful information (like text samples, or maybe images) to the clipboard upon your request.

This article describes how to allow certain web sites to access your system's clipboard and describes security and privacy issues this could cause.

Problems caused by unintended clipboard access

There are several types of problems which can happen if a web site is able to use your system's clipboard through JavaScript:

  • A web site may erase the clipboard data, which may cause you to lose important data that you had copied previously into the clipboard.
  • A web site may change the clipboard data, which may cause different data to be pasted later on instead of the data you intended to paste originally.
  • A web site may read the clipboard data, and use them in malicious ways or send them to a third party without your knowledge.

Therefore, you should only permit the web sites that you absolutely trust to be able to access the clipboard.

Enabling clipboard access for a web site

There is no such functionality built in to Firefox. In addition, there may be third-party Firefox extensions that can help you. Go to addons.mozilla.org to search for and install extensions for Firefox.

For more information about add-ons, read Customizing Firefox with add-ons.




Based on information from Granting JavaScript access to the clipboard (mozillaZine KB)


Did this article solve a problem you had with Firefox?

Was this article easy to understand?



Page last modified on Thursday 25 of September, 2008 20:28:35 PST.
Contributors to this page: Chris_Ilias , AliceWyman , np and ehsan .
- This is a help article -