Please note, this is a STATIC archive of website from 03 Nov 2016, does not collect or store any user information, there is no "phishing" involved.


This article needs a technical review. How you can help.

« Gecko Plugin API Reference « Browser Side Plug-in API


Returns the browser's user agent field. This can be used to handle variations in different browsers (or versions thereof) when implementing your plug-in.


#include <npapi.h>
const char* NPN_UserAgent(NPP instance);


The function has the following parameter:

Pointer to the current plug-in instance.


A pointer to a buffer that contains the user agent field of the browser.


The user agent is the part of the HTTP header that identifies the browser during transfers. You can use this information to verify that the expected browser is in use, or you can use it in combination with NPN_Version() to supply different code for different versions of the same browser.

See also

Document Tags and Contributors

 Contributors to this page: teoli, kscarfone, Sheppy, Pmash
 Last updated by: kscarfone,