views:

105

answers:

5

Sometimes I visit a website with Chrome and get a message that I need to use one of the supported browsers to access the site. It really pisses me off (latest one: http://www.retailroadshow.com).

Anyone knows a link that explains why it is bad and what is the correct way to handle those things? I want to send it to them ...

Thanks

A: 

I think that browser sniffing is fine when it enforces you not to use too old browsers (especially IE6). Someone has to enforce that so that internet can move forward. This particular side's check is extremely stupid and outdated, just take a look what they suggest:

  • Microsoft Internet Explorer 5.5 or higher
  • Mozilla Firefox 1.0 or higher
  • Netscape Browser 7.0 or higher
  • Safari 1.2 or higher for Macintosh

And the must for browser check is ability to use site as is.

Just do not use their services if they are unable to respect potential clients.

Andrey
I like how they have Netscape in there. Netscape is more reliable than Chrome and Opera? But still, I'd like to inform them so that they learn. Make the web more standard.
nute
@nute list is delirious. IE 5.5 very funny. Netscape is not longer supported, no one uses FF 1.0.
Andrey
This is the difference between white lists and black lists.
Marcus Adams
you didn't answer why browser sniffing is a better idea then feature sniffing. which it isn't.
Matt Briggs
@Matt Briggs not all features can be sniffed, and code will eventually get bloated with checks. i answered why browsing sniffing is fine, disagreeing with somebody's opinion is strange reason for downvoting.
Andrey
+1  A: 

This has some good case studies on the cons of browser sniffing, in the context of Javascript.

http://www.quirksmode.org/js/support.html

chimerical
+4  A: 

This looks like a duplicate question to the following:

http://stackoverflow.com/questions/1294586/browser-detection-versus-feature-detection

There are arguments for edge cases where browser detection is appropriate, generally when used for internal applications where the app is built around a particular browser, or when feature detection is difficult or the browser implements the feature incorrectly.

One of the links present in the question above points to Mozilla's developer site, giving some cases for browser detection, pitfalls to avoid, and tips for doing it correctly.

https://developer.mozilla.org/en/Browser_Detection_and_Cross_Browser_Support

Robert Hui
The Mozilla article is probably the definitive one on the subject. Nice find.
Marcus Adams
Heh, thanks Marcus. I can't take credit for the initial find; just for re-discovering and putting it in the spotlight again. =)
Robert Hui
+1  A: 

Browser Detection: Necessary or Negligent?

Discusses "feature testing" versus "browser sniffing".

Marcus Adams
A: 

Here's a good example. Basically the example is about a newer version of the browser fixing the issue that required browser specific processing. For this reason it is better to determine if the bug is going to happen regardless of which browser is used rather than do your specific processing based on the browser - “detect the bug, not the browser”.

rosscj2533