Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Browser detection Plugin?

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

like image 260
chobo2 Avatar asked Feb 28 '23 12:02

chobo2


2 Answers

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

like image 88
Varun Avatar answered Mar 07 '23 23:03

Varun


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.

like image 22
Stephen Fuhry Avatar answered Mar 07 '23 23:03

Stephen Fuhry