NPN UserAgent
From MDC
« Gecko Plugin API Reference « Browser Side Plug-in API
Contents |
[edit] Summary
Returns the browser's user agent field.
[edit] Syntax
#include <npapi.h> const char* NPN_UserAgent(NPP instance);
[edit] Parameters
The function has the following parameter:
- instance
- Pointer to the current plug-in instance.
[edit] Returns
A pointer to a buffer that contains the user agent field of the browser.
[edit] Description
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 Netscape browsers.