1

I need to redirect users to our old website for browsers that can't handle Angular Material.

(1) I was thinking of detecting the browser agent and version, but I'm having trouble finding a definitive list for Chrome/Safari/Firefox of which browsers and versions actually work. Also the client detect code I tried didn't seem to return anything with iPhone 6/iOS9.

(2) Could I just detect a specific feature somehow, ie. flexbox, and use that to determine if the browser is unsupported?

ngDeveloper
  • 1,304
  • 2
  • 16
  • 34
  • 1
    I wouldn't bother checking version of Chrome / Safari / Firefox because they are autoupdated, and really old versions which won't support Angular Material are very very unlikely. There is only IE which you can check (but probably every IE >= 11 will work) – Bartek Cichocki Aug 12 '16 at 20:02
  • I've been doing some testing with BrowserStack Live. In our case IE10 works too. Safari iOS6 and lower doesn't work (iOS7, iOS8 and IOS9 work). – ngDeveloper Aug 12 '16 at 20:08
  • 4.2% of iOS users has now iOS6 and lower so hard to say. I wouldn't mind that and I would not support it, but I don't know your case. – Bartek Cichocki Aug 12 '16 at 21:05
  • Also, 6.2 Safari/desktop works. 6.0 doesn't work. – ngDeveloper Aug 12 '16 at 22:46

1 Answers1

1

A quick look at the docs shows that...

.... Angular Material is targeted for all browsers with versions n-1; where n is the current browser version.

Assuming they keep this pace, you could query a website like Browse Happy to find the latest version of the client browser, then compare it to the version the client is using.

Community
  • 1
  • 1
Danny Buonocore
  • 3,731
  • 3
  • 24
  • 46