Skip navigation.

exploreopera

| Help

Sign up | Help

Posts tagged with "sniffing"

practising and preaching

,

The Surfin' Safari blog writes:

We strongly recommend looking for the AppleWebKit string and its version number, *not* for Safari


Apple's Safari FAQ writes:

If you need to identify the exact browser and version of clients accessing your site, use the AppleWebKit/XX portion of the string.


And lib.js on apple.com says:

this.isSafari= (agent.indexOf('safari') != -1);


Makes you wish browser vendors had tried suing browser sniffer authors back in 1996, rather than adding elaborate workaround strings to their UserAgent information. Seriously, authors should try a lot harder to not use name sniffing.

Saab says //TODO: Opera-compatibility

, ,

function getFlashMovieObject() {
var errmsg = 'Sorry, your browser is missing the functionality for viewing this page...';
if (isOPERA  ||  isMAC) {//have to find out about this...
alert(errmsg);
return null;
}


source

Sorry Saab, your web developer is missing functionality for avoiding browser detection.

sniff and die

, , , ...

Well, I didn't quite get to the bottom of the Live.com problems last time but now I know: it's a bug in their browser sniffer. They say

Web.Browser._isIE=!Web.Browser.isMozilla()&&!Web.Browser._isOpera;


but mean

Web.Browser._isIE=!Web.Browser.isMozilla()&&!Web.Browser.isOpera();


.. so isIE is set to true even though we're Opera. That means the script gets into the wrong branches of the getElementsByTagName stuff in my previous post.

Yet another proof that all the world's evils come from browser sniffing. If sniffing wasn't necessary, we would have peace in the Middle East, no starvation in Africa .. OK, sorry, I'm getting carried away here but at the very least Live.com would be alive and kicking.