Friday, March 15, 2013

Enable "Click To Play For" Plugins in Firefox

I have a simple use case:

1. All plugins should run by default because they hog CPU and memory, and are potential security risks.

2. Flash plugin based ads are especially evil. They distract you from content and sometimes consume bandwidth by playing videos you don't want to watch. I don't block ads by default as I think they are good for web.

3. Allow plugins to run when I need them e.g. videos, games and applications.

Earlier I was using Flashblock, and I disabled Java and other plugins to achieve same goals. But with Firefox 21 (in Aurora channel) Flashblock doesn't work. Simpler and better solution is to enable click to play for plugins in Firefox. Following are the steps:

1. Enter "about:config" as address and press enter.

2. Click on "I will be careful, I promise!".



3. In the search box type "click_to_play". Toggle the value "plugins.click_to_play" to "true" by double clicking it or by pressing Enter after selecting it.


NOTE:  From Firefox 23 onwards (currently in Beta, Aurora and Nightly channels) you need to set the value of key "plugin.default.state" to 1 get the same effect.




 4. Next time plugins will not run and a placeholder will be shown instead:


You can run the corresponding plugin by clicking on it.


5. You will also see icon in Awesome bar next to address.
  • Through this you can activate plugins for which nothing is displayed on the page, e.g. music playback.
  • Add sites to whitelist so that all plugins are run by default for that site. This is similar to "Whitelist" in Flashblock.