Skip to content

Instantly share code, notes, and snippets.

@esedic
Created September 2, 2014 07:55
Show Gist options
  • Save esedic/2be1b84a942e75e5f9d5 to your computer and use it in GitHub Desktop.
Save esedic/2be1b84a942e75e5f9d5 to your computer and use it in GitHub Desktop.
Detect older IE with PHP and load HTML5 shiv library
<?php
//IE8 compatibility
if(preg_match('/(?i)msie [1-8]/',$_SERVER['HTTP_USER_AGENT']))
{
JFactory::getDocument()->addScript('https://html5shiv.googlecode.com/svn/trunk/html5.js');
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment