DEV Community

loading...

Discussion on: Analytics with vanilla JS: page views

zigabrencic profile image
Ziga Brencic Author

IE is still supported and developed right? What am I missing here?

I checked my personal page and yes percentage of IE users is low but still. Fall back to XHR sounds like a good option.

How would you do the fall back? With try and catch? Or would you try to detect if user is on IE? If yes how? As far as I know there's no consistent way to check browser version.

As I mentioned in the article I'm a bit light on JS since I come from data science. So any tips are welcome :)

Thread Thread
sidvishnoi profile image
Sid Vishnoi

IE 11 is still supported by Microsoft, but not for long. Adding a development focus on IE in 2019 is a waste of efforts, unless it's absolutely necessary. You can do it in a progressive way, where a site is usable on IE, but won't support all the features.

Falling back to XHR can be as simple as checking if (!window.fetch).

There used to be some specific HTML comments for detecting if browser is IE (not supported in IE 11). But feature detection is a better alternative than browser detection.

Thread Thread
zigabrencic profile image
Ziga Brencic Author

Alright didn't know that. Feature detection there is then.

Thanks again.