Comments (8)
Yeah, of course! The changes will be non-breaking at first in terms of the public API. There will be deprecations and a plan to migrate users to the new one over time.
from polyfiller.
Hey there. I looked into the problem, which was caused by browserslist-generator
treating Firefox on Android as equivalent to Firefox on Desktop since the Caniuse
data that Polyfiller is relying on for the time being is better for desktop Firefox and there has been feature parity between the two variants of Firefox for some time. However, this has clearly changed, and thanks for making me aware of it. I've started to distinguish between the two and added a test to ensure that the feature detection returns false for the user agent.
I'll deploy a new version of Polyfiller as soon as possible and will close this issue when that happens.
from polyfiller.
Ok thanks.
By the way wouldn’t it be much more reliable and future proof to do feature detection with JavaScript and then only load the poly fill of the feature doesn’t exist?
from polyfiller.
Basing the feature detections and available Caniuse and mdn data, and generating a Browserslist from the user agent has proven to be somewhat unreliable and not granular enough. The thing is that I've completely rewritten Polyfiller over the past year with a much more advanced software infrastructure which includes actually deploying feature detections to thousands of browsers and building up a correct database of data. This is also why no real development is happening in this repo, because the entire thing is happening in a private repo, before I'll finally merge the two.
from polyfiller.
@wessberg why so complicated?
can't you just use https://modernizr.com/ to load polyfills dynamically if a feature is not available?
from polyfiller.
We only have the request headers to work with on the server-side. You are however correct that we could send back a list of feature detections to the client in the first response from Polyfiller, which the client could then execute before sending back a follow-up request, this time pre-qualified for a specific set of features that the feature detections didn't pass for. This, I assume, is what you are suggesting. The advantage of this approach is of course that we get 100% reliable data based on that specific client. The disadvantage, however, is that we need to have several network roundtrips, as well as added payload size: the first roundtrip with the feature detections (of which there may be hundreds), and the second roudtrip with whatever features is requested by Polyfiller after running the feature checks.
The new architecture has the advantages of both approaches! When it sees a new User Agent, it checks if it has run the feature detections for that specific user agent, and if so, it doesn't need to do that again and can just immediately send back a pre-built bundle sitting in the cache waiting to be sent back in an instant. However, if a user agent representing an unknown engine or for which we have no data is requesting data from Polyfiller, it instead sends back a bunch of feature detections, before finally generating a follow-up request to Polyfiller with the specific features needed. Polyfiller then puts that in the cache such that it knows how to treat that specific user agent in the future. To build up an initial seed, the feature detections are deployed to thousands of browsers in all sorts of environments such that for by far the most versions of browsers, we won't need two network roundtrips, because we already have the data. That's the new infrastructure, and it's going to be great!
from polyfiller.
Sounds good. Since people are already using polyfiller in production, I hope we can make the migration go smooth (not have it fail on our users)
from polyfiller.
Closed, given that a new version of Polyfiller has been deployed that contains this fix.
from polyfiller.
Related Issues (20)
- Production Regression --- Uncaught Error: Cannot find module '../internals/webkit-string-pad-bug' HOT 3
- Chrome 86 error HOT 1
- GET https://polyfill.app/api/polyfill?features=fetch,pointer-event,scroll-behavior,es net::ERR_ABORTED 500 HOT 8
- Downtime (again) HOT 3
- "Could not determine locale: No default locale has been configured" from ListFormat polyfill in Safari HOT 2
- scroll-behavior not working on IOS' Safari
- /api/polyfill doesn't work with Chrome Canary HOT 1
- [Error] Service crashed HOT 5
- Use queue to drive bundle generation to deal with traffic spikes
- Set Vary: Accept-Encoding header on responses to make them CDN-friendly
- When loading in ready polyfill bundles from the disk cache, make sure to respect the maximum heap size
- Make sure to respect maximum available disk- and memory capacity and dispose of cached bundles either from the memory and/or disk cache when these resource limits are met HOT 2
- Invalid certificate error shown on Safari iOS 9 and under devices
- Error in Web Service API Reference HOT 2
- Error in Web Service API Reference HOT 2
- Getting 500 status error HOT 4
- Couple of missing polys
- Certificate expired for polyfill.app HOT 2
- Do you want the domain pollyfiller.io ?
- Service is down HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polyfiller.