determine client browser

386 views
Skip to first unread message

Jonathan

unread,
Jul 31, 2014, 9:01:27 AM7/31/14
to shiny-...@googlegroups.com
Hi,

How may I detect/determine which browser the client is using from within Shiny?

Our corporate standard is IE8. I'd like my app to detect the browser type and display a message to switch to chrome or firefox if the browser is IE. This is a very high source of frustration right now. I send folks a link to an app. I forget to remind them to use Chrome. Even if I remember, they still just click on the link. It opens in their default browser of IE8. It doesn't work, they don't know why, they try stuff like rebooting their computer. Just a real drag. And even for regular users, it doesn't work out well for them to switch their default browser. All of our enterprise apps are requiring IE8. So if a user switches they get frustrated because in their job they use the enterprise stuff more than the shiny app I'm working on.

Too bad folks can't just right click on the link and select "open with" like they can on files in windows explorer. Or it would be cludgy but cool if there was a browser proxy type app that you could install and set as default browser. Such that when you click on a link, that app would run, and list all browsers installed on the computer, and let the user pick which one to run. I would love it myself. Anyone know of such an app out there?

Jonathan

Sigbert Klinke

unread,
Aug 8, 2014, 7:14:12 AM8/8/14
to shiny-...@googlegroups.com
You could embed JavaScript code in your app, see https://groups.google.com/forum/#!topic/shiny-discuss/LTvLLCRe0W8 .

Jonathan

unread,
Aug 11, 2014, 6:24:34 PM8/11/14
to shiny-...@googlegroups.com
Thanks. This pointed me in the right direction. I found and merged elements from these two examples:

Using javascript to get browser and version: http://stackoverflow.com/questions/5916900/detect-version-of-browser

It works great in Chrome and Firefox. But it totally fails in IE8. Again, my goal is to display the simplest possible web page with a message or error like "Please use Chrome or Firefox" when it's IE8. Any suggestions?

As an asside, I did find a program called "PickBrowser" for windows, that helps, but doesn't really solve my issue.

Jonathan
Reply all
Reply to author
Forward
0 new messages