views:

586

answers:

6

Hi

I have a website that I made and I am planning to redo it. The current version of the site used a jquery callout plugin that did not fully work in IE6. This got me thinking about browser detection.

At first I was just going to put the supported browsers on the home page but then today on Digg I saw some post about some jquery plugins and wordpress and in the article there was a plugin for detecting IE.

So I started to look around for some browser detection plugins. I found a few of them but they where over the top like this one

sevenup

Its nice but it makes a huge popup and tells them to update. This one is better then another one I found where they basically forced the user to update or they could not continue on the site.

So I found this one

jquery plugin

This one is pretty nice since it looks at the major browsers and does detection on them too expect for chrome which I noticed triggers and an outdated browser with this plugin.

So I started to look at the jquery documentation to see if they had a browser detection for chrome this is when I saw that they "Deprecated" and now recommend "Support".

So now I am just confused like "Support" seems to be good and I read many posts on this site saying you should use it.

But then it does not support stuff like .png detection that might have been useful to me since of that plugin(however I probably will not be using the plugin anymore since I think the author just gave up on it).

Plus I don't know if this is something I am looking for at this time. Like I am guessing with "Support" you use it to detect something that is not supported and then do some alternative thing for that browser?

For me I am more looking for something to tell the user "Hey look I tested this browser in the these versions of Firefox(3.5+), IE(8+), Opera(9.5+),Chrome(Something), Safari(Something). If your not using these versions you may not being seeing the site how it was intended"

Of course I would try to have something shorter then that message but that the gyst. I am also assuming that the site would work in future versions of these browsers.

I still check to see if my site works(they usually do) and is half decent in IE 6 but I won't spend hours fixing stuff that might be off in older browsers like IE 6.

I won't test my site in older version of other browsers like firefox since I would think the user have to the sense to update so no point testing firefox 2.0 or whatever.

So is there a plugin that fits this description? Or can "Support" do what I want?

Thanks

A: 

For ie6, you can just do this:

if(typeof document.body.style.maxHeight === "undefined") {
  // do stupid ie6 stuff
}

In my experience, most other stuff can just be fixed by tweaking CSS and stuff. I'm not too excited about the whole move to using the "Support" thing either in jquery.. You might also want to look into feature detection.

Stephen J. Fuhry
I thought that was what "Support" is.Ya I know there are ways around doing IE6 and I probably will be using them a bit but like I said I don't want to cater hours and hours to make it perfect in IE6 just a waste of time if we keep making it perfect for IE6 they will never upgrade.For me like I said the browser detection is tell the user that I have not tested every version of each browser under the sun.I also don't get the argument about browser detection not working for obscure browser. My response to that is who cares? I am not go out of my way for obscure browsers that a few ppl use.
chobo2
Now that you mention it, I'm sure "Support" does something like the example above. Also, I totally agree: us web devs should be all but intentionally making IE6 users' lives miserable to force them out of the stone age..Unfortunately for me, I occasionally have to create sales reports and other things for our sales reps (who are outside the company). Given our relationship, we kindof have to cater to those of them that insist on using IE6.
Stephen J. Fuhry
+1  A: 

If you're concerned with just filtering IE versions against everything else, IE conditional comments will allow you to feed separate page content cleanly -- this is the simplest way of feeding e.g. CSS workarounds to old IE versions.

For plain scripting, the Support based mechanism "does the browser have the function I want, regardless of what it calls itself?" does what you are really asking.

There is, of course, no substitute for testing in a range of browsers to see if things do in detail what you want.

Steve Gilham
A: 

Well I post a plugin based on the BrowserDetect of quirksmode.org you can find it on http://www.stoimen.com/blog/2009/07/16/jquery-browser-and-os-detection-plugin/

greetings, stoimen

stoimen
Hmm I will check it out. Have not looked at the source and how it is rendered but would it be easy to add a box at the top saying a message(like the link I referred too?)Also I noticed in your Demo it just says like "Firefox" but not the version? Can it display version number?
chobo2
A: 

Give this a try. http://jquery.thewikies.com/browser/

Varun
A: 

Have a look at my new Version: badBrowser Script 1.4 http://blog.team-noir.net/2010/05/jquery-badbrowser-update-version-1-4/

Greetz from Germany, Martin

Martin
A: 

I actually decided to go with JReject. It is pretty much has that nice look as sevenup but does not take hours to figure out how to use.

http://jreject.turnwheel.com/

The only thing wrong with it, it is still beta and I don't know how stable it can be but from what I seen so far it is pretty good.

chobo2