How To Load Different View For Mobile Devices In CodeIgniter 3 - PHP User Agent Class The User Agent Class provides functions that help identify information about the browser, mobile device, or robot visiting your site. In addition, you can get referrer information as well as language and supported character-set information. The User Agent class is initialized in your controller using the $this->load->library function: $this->load->library('user_agent'); The name of the web browser viewing your site: $browser = $this->agent->browser(); > Home Controller <?php defined ( 'BASEPATH' ) OR exit ( 'No direct script access allowed' ); class Home extends CI_Controller { public function index () { // Load User Agent Library [OR autoload.php file] $this -> load -> library ( 'user_agent' ); if ( $this -> ...