reject obsolete browsers

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

reject obsolete browsers

Post 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
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: reject obsolete browsers

Post 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).
Post Reply