I’m trying to make my site a little friendly, and when a HandsOnTable can’t be supported, I want to show something else.
Trouble is, I’m struggling to detect when HandsOnTable can’t be supported (server or client side).
Many of my users are using IE 11 in Compatibility View… which I got to work fine for them. The problem is that is Agent String reports back that they’re IE 7. This stinks because HandsOnTable isn’t support by anything IE 8 or older. So how do I go about handling this?
Ideally I’d like to make this “detection” server side (in ASP.NET), but I’ll take whatever I can get.
Thanks!
Thanks for an update @sam_r_phillips
I’ll share your request with our programmers and keep an eye on the case to be sure it’ll end with decent solution.
@sam_r_phillips
I’m going to throw one thing out at you — though I have no idea whether it will be of interest/help.
Are you aware that from ASP.NET (IIS) you can server-side force your site to run in IE 11 Native mode even though your user may have marked the site to run in Compatibility mode? (We did that once our app was fully HTML5.) I cannot recall at present whether that is for all pages/site or whether it can be done at the individual page-level.
Currently Handsontable has some simple browser recognition mechanisms (Handsontable.helper.isIE9() for example), but they’re not guaranteed to be bullet-proof, and won’t work properly when using the Compatibility Mode.
You’re right though, that some graceful degradation would be a good idea, especially on the examples page. I’m not sure if we should implement this into Handsontable itself, but it’s definitely a thing to think about, so thanks for bringing that up
No reply to my post about forcing IE 11 Native mode, so I don’t know that’s of any interest.
Googling for “detect ie11 compatibility mode” throws up several posts to read. For example http://stackoverflow.com/questions/27912296/ie11-detect-whether-compatibility-view-is-on-via-javascript. If you can get what you want just out of navigator.userAgent, but want it ASP.NET server-side, have a look at Page.Request.Browser.Capabilities; if you need to do JavaScript work but still want the result at the server you could presumably send a cookie back.