[pmwiki-users] Check for unsafe browser?

Patrick R. Michaud pmichaud at pobox.com
Sat May 14 01:21:45 CDT 2005


On Sat, May 14, 2005 at 08:13:47AM +0200, chr at home.se wrote:
> 
> Does anyone know how I could check if the user is using an unsecure
> browser (i.e. IE)?  If they are doing that, I'd like to place a banner at
> the top of the page pointing them to some alternatives.  (This is
> primarily for an internal work wiki - less IE => less spyware etc)

Normally one either checks the $_SERVER['HTTP_USER_AGENT'] string
or uses JavaScript to detect an IE browser.  You'd have to search
the web for appropriate user agent strings -- unfortunately nearly
all browsers try to masquerade as a different browser.  For example,
IE 6.0 on my XP box identifies itself as

    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)

I seem to recall seeing somewhere that the presence of "MSIE" in
the user agent string was a pretty good indication of an IE browser.

Pm 



More information about the pmwiki-users mailing list