8 ms·
> For example, the Fetch API can replace jQuery’s Ajax functions Except that it won't work for ~6% of your visitors (± a few percentage points, based on your l
by Carpetsmoker 7y ago
> For example, the Fetch API can replace jQuery’s Ajax functions
Except that it won't work for ~6% of your visitors (± a few percentage points, based on your locality and audience).
Some developers sneer at these kind of numbers and comaplain about old browsers and whatnot. Yeah, it's annoying. But it's also reality, and as a professional you'll have to deal with it.
> The querySelector and querySelectorAll methods replicate jQuery’s selection capabilities
The jQuery selectors have quite a bit of extra useful functionality though.
- timdorr 7y agoYou can polyfill it in under 500 bytes: https://github.com/developit/unfetch https://github.com/developit/unfetch
- Carpetsmoker 7y agoAnd 7 more polyfills later and you've ended up with a hacky and incomplete version of jQuery.
- timdorr 7y agoNo, you've ended up with standard web APIs so you can safely drop those polyfills whenever browser support is at an acceptable level.
- earthboundkid 7y agoYes, there is also polyfill.io, which sniffs user agents and only sends the scripts a particular browser needs.
- starik36 7y agoYou still have to polyfill Promise, so it's definitely not under 500 bytes.
- dillonmckay 7y agoSo, I work with car salespeople at dealerships, and also their customers (car-buying folks). We recently checked our top sending domains (the car-buying customer’s email address), and of course @gmail.com is #1, but @aol.com and @comcast.net are in the top 5. Depending on the dealership, all the PCs can be locked-down on IE9.
- tcd 7y ago> and as a professional you'll have to deal with it. Yes, by not supporting those users. If you want to use IE 11 that's fine by me, doesn't mean I need to go out of my way to ensure it works for them.
- Carpetsmoker 7y agoAs a person for your hobby project or whatnot? Sure. As a business? Yeah nah, that's not how it works. Imagine turning away 7% of your customers at the door of your shop.
- yakshaving_jgt 7y agoIn some industries it's much more than 7%. Luckily once IE11 is EOL (which IIRC is in January) I'll be able to block requests from that browser, but only because I can use the argument "this browser is EOL and using it is a security risk." Not every business has that luxury.
- mythrwy 7y agohttps://gabriellaroche.dev/ie11-death-countdown/ https://gabriellaroche.dev/ie11-death-countdown/ I really hope you are right about January and this counter is wrong. In the meantime I'm not worrying about IE anymore (have luxury of not working at bigco and can say, "sorry, we don't support that").
- yakshaving_jgt 7y agoAh, crap. It’s IE10 I was thinking of, so it’s still IE11 I’ll be suffering with for some years.
- JMTQp8lwXL 7y agoI very well might be in a management role before I have to stop worrying about IE 11 directly. This countdown couldn't come sooner.
- 7y ago
- inimino 7y ago> ± a few percentage points The variance is a lot higher than that. Tons of web projects are for internal tools (controlled environment), for mobile first, or in industries or language communities or countries or markets where the browser distribution is entirely different. So as a professional what you do is (1) measure, (2) reach a business decision about browser support, and only then (3) choose technologies. With polyfills and Babel, using new features in old browsers isn't really a problem, but it's unfortunate that this is often required, and it's unfortunate that Web development has become so fragmented by developers preferring to use tools built on the platform rather than authoring for the platform directly.