cordova-plugin-useragent-gd

Allows you to change your User-Agent for HTTP requests.


Keywords
user, agent, useragent, user-agent, ecosystem:cordova, cordova-android, cordova-ios
License
MIT
Install
npm install cordova-plugin-useragent-gd@1.0.6

Documentation

Cordova/PhoneGap UserAgent Plugin

Plugin for Cordova 3.0+ that allows you to change your User-Agent for HTTP requests.

Adding the plugin to your project

To install the plugin, use the Cordova CLI and enter the following:
cordova plugin add https://github.com/generaldevelopers/cordova-plugin-useragent

Platforms

Use

To set your User-Agent:
UserAgent.set(useragent)

To get your current User-Agent:
UserAgent.get(function(ua) { })

To set your User-Agent back to the default:
UserAgent.reset()