PHP script to warn the Internet user of the use of an obsolete browser (PHP Procedural + Symfony2)

It’s common that with the use of outdated versions of Internet Explorer, some clients may experience browser-related issues. For example, some WYSIWYG editors operate very unpredictably on IE8 or IE7.

Remember, if your client is on Windows XP, their version of Internet Explorer will be at most version 8.

Our PHP script detects if the version of Internet Explorer is outdated. If so, a message prompts the user to switch to a more efficient, secure, and up-to-date browser!

 

How to use it ?

We recommend using this code on the login page of your administration. Just copy/paste this code right after the tag, after retrieving the script below :

For the record, additional comments are no longer taken into account from version 10 onwards. The above code will therefore only execute on versions equal to or lower than Internet Explorer 9.

ie-detect-screenshot
Preview of the message displayed for an IE8 user

Download the files for Symfony 2 : https://github.com/reficedev/alert-ie-sf2