PFS

PFS stands for the Plugin Finder Service and is used to serve up RDF files that describe plugins for a given mime-type and client.

A new feature in Firefox 3 is Plugin Blocklisting. If you're looking for the next generation of PFS, see the PFS2 page.

Contents

URL Format

RDF Format

The RDF format looks like this:

<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:pfs="http://www.mozilla.org/2004/pfs-rdf#">

<RDF:Description about="urn:mozilla:plugin-results:application/x-shockwave-flash">
 <pfs:plugins><RDF:Seq>
  <RDF:li resource="urn:mozilla:plugin:{4cfaef8a-a6c9-41a0-8e6f-967eb8f49143}"/>
 </RDF:Seq></pfs:plugins>
</RDF:Description>

<RDF:Description about="urn:mozilla:plugin:{4cfaef8a-a6c9-41a0-8e6f-967eb8f49143}">
 <pfs:updates><RDF:Seq>
  <RDF:li resource="urn:mozilla:plugin:{4cfaef8a-a6c9-41a0-8e6f-967eb8f49143}:"/>
 </RDF:Seq></pfs:updates>
</RDF:Description>

<RDF:Description about="urn:mozilla:plugin:{4cfaef8a-a6c9-41a0-8e6f-967eb8f49143}:">
 <pfs:name>Adobe Flash Player</pfs:name>
 <pfs:requestedMimetype>application/x-shockwave-flash</pfs:requestedMimetype>
 <pfs:guid>{4cfaef8a-a6c9-41a0-8e6f-967eb8f49143}</pfs:guid>
 <pfs:version></pfs:version>
 <pfs:IconUrl></pfs:IconUrl>
 <pfs:XPILocation>http://fpdownload.macromedia.com/get/flashplayer/xpi/current/flashplayer-win.xpi</pfs:XPILocation>
 <pfs:InstallerShowsUI>false</pfs:InstallerShowsUI>
 <pfs:manualInstallationURL>http://www.adobe.com/go/getflashplayer</pfs:manualInstallationURL>
 <pfs:licenseURL>http://www.adobe.com/go/eula_flashplayer</pfs:licenseURL>
 <pfs:needsRestart>false</pfs:needsRestart>
</RDF:Description>

</RDF:RDF>

Script Variables

In the service itself, there are variables that need to be defined in order to add a new plugin. These are:

$name = ' ';                    // Name of the plugin, used in UI.
$guid = '-1';                  // GUID to uniquely identify this plugin.
$version = ' ';                 // Version string.
$iconUrl = ' ';                 // URL of the icon for this plugin, used in UI.
$installerLocation = ' ';       // Location of the external binary installer, should be SSL or rely on installerHash.
$installerHash = ' ';           // Installer hash value, used to verify installer.
$XPILocation = ' ';             // Location of the XPI the browser should install.
$installerShowsUI = 'true';    // Does the installer show a UI?  If no, chrome is used.
$manualInstallationURL = ' ';   // URL to go to if auto-install fails.
$licenseURL = ' ';              // License information, if needed.
$needsRestart = 'false';       // Does it require a browser restart?

New Plugin Checklist

If you are thinking of listing a new add-on on PFS, you'll need the above info. Here is an easier to copy/paste list:

  • Name of the plugin (Windows Media Player 11/Vista)?
  • GUID
  • Version string
  • URL of the icon to be used for the plugin installer UI
  • Location of the XPI that the browser should install.
  • Does the installer show its own UI?
  • URL for manual installation if the auto-install fails.
  • License URL
  • Does it require a browser restart post-installation?
  • Mime types it needs to be associated with.
  • Operating systems (in UA string) that should be given WMP 11.
  • Versions of Firefox that are compatible (if not all)?

Testing PFS

if you want to test PFS, here are the steps to do so:

  1. update pfs.datasource.url to point to your instance of PFS. The default is:
https://pfs.mozilla.org/plugins/PluginFinderService.php?mimetype=%PLUGIN_MIMETYPE%&appID=%APP_ID%&appVersion=%APP_VERSION%&clientOS=%CLIENT_OS%&chromeLocale=%CHROME_LOCALE%
Change your server to:
http://yourserver.com/services/pfs.php(then the rest of the junk from the default)
If we're testing on preview:
https://preview.addons.mozilla.org/services/pfs.php(then the rest of the junk from the default)
  1. Open a page with an embedded object with a mime-type that corresponds to the plugin you want to test.
  2. Note: you can always use LiveHTTPHeaders or TamperData to see what URL your client is actually hitting. Going to the URL directly will let you view the PFS RDF for errors.