Page 1 of 1

reject obsolete browsers

Posted: Sun May 31, 2015 7:45 am
by Vegan
I have a new page, with a link to Google Chrome

so I wanted to conjure of some solution to seen users of IE10 and older etc to update their browser

Not sure if the others are HTML 5 compliant and CSS capable or not, but the rejector needs to be able to spot an obsolete browser and gracefully prompt to upgrade

while I am at it, perhaps XP users could see a custom ads for a windows upgrade

not sure if PHP can do the job reliably, and at the same time I need to watch for bots

Re: reject obsolete browsers

Posted: Sun May 31, 2015 6:12 pm
by requinix
IE 11 isn't supported on XP. Which some people still have (unfortunately).

You can target IE <11 using conditional comments. No PHP required.

For the ad, check the user agent string for "Windows NT 5.1". You can do that in both PHP ($_SERVER[HTTP_USER_AGENT]) and Javascript (navigator.userAgent).