IE11 browser detection!

  • Thread starter Thread starter AdminAdmin is verified member.
  • Start date Start date
Admin

AdminAdmin is verified member.

Well-Known Member
Staff member
Administrator
IE11 gets along pretty well with vB4, though file downloads get a bit wonky due to some changes in how IE is detected.

Please note, that 4.2.2 and beyond ALREADY includes these changes.


In includes/functions.php find:



PHP:
         // detect macintosh


Add above:

PHP:
// Detect Modern IE11+
        if (strpos($useragent, 'trident') !== false AND !$is['opera'])
        {
            preg_match('#rv:([0-9\.-]+)#', $useragent, $regs);
            $is['ie'] = $regs[1];
        }



Next, find:

PHP:
if (strpos($useragent, 'gecko') !== false AND !$is['safari'] AND !$is['konqueror'])

And replace it with

PHP:
if (strpos($useragent, 'gecko') !== false AND !$is['safari'] AND !$is['konqueror'] AND !$is['ie'])
 

Facebook Comments

Similar threads

Admin
Replies
1
Views
3K
AdminAdmin is verified member.
Admin
Lee_Jin
Replies
3
Views
5K
Eternityls
E
Admin
Replies
0
Views
1K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
1K
AdminAdmin is verified member.
Admin
Back
Top