Comments (9)
@joker-777 what do you think?
from alephbet.
@gingerlime Super interesting article. I wasn't aware of this behavior. In kenhub we use whatwg-fetch as a polyfill for fetch
but we only load it when it doesn't exist. I would simply use fetch
+ keepalive
and let the "developer" who uses Alephbet decide if he needs a polyfill or not.
from alephbet.
So users can load a polyfill and the Alephbet code would automatically be able to use it?
from alephbet.
That's kind of what we do. We load this js code very early inline which checks if fetch
or other methods exist and if one of them doesn't then we inject this script.
from alephbet.
Ah, and yes, once loaded, it is available for all js libraries.
from alephbet.
Okay, but this feels like quite a lot of work for a user of Alephbet to have to worry about. I don't mind having a minimum-browser support, but then it needs to be documented clearly. Otherwise, some people might try to use it and will just get an error and won't necessarily know why. Or won't even know it can error in older browsers, and then their data is skewed.
The current JS fallback supports very old browsers, so we can also keep it like we do already (we check for jquery, but we can check if fetch is available instead). I think it's nicer to offer older-browser support out of the box if it's not super complicated for us to do that.
from alephbet.
I disagree. You would make the package bigger than necessary. Especially in the case of then
we shouldn't worry about it because it is widely supported except for IE. If someone wants to support IE then they will use anyway polyfills which don't have to be by the way so "complicated" as we do it. They simply could include them and that's it.
from alephbet.
We agree then :) I said it's fine to have a minimum browser support, but we just need to communicate it very clearly. And the code won't be much bigger even if we keep the fallback. We're talking about maybe 5 lines of code?
from alephbet.
Ah, ok, yes that's true. It doesn't save a lot of code.
from alephbet.
Related Issues (20)
- How to connect an external experiment with goals in alephbet? HOT 9
- link better the goal and the experiment HOT 3
- Test support? HOT 3
- trigger behaviour
- Any reason you haven't wired this up to Mixpanel? HOT 6
- Raise Error object instead of string HOT 6
- [Question] Can I set/change the traffic allocation between variations? HOT 6
- user-based / cross-device tracking
- Store.js dependency is out of date (causing Alephbet to fail in Safari private mode) HOT 3
- Cannot find `lodash.custom` when used with mocha HOT 5
- Multiple tracking back-ends? HOT 3
- minified version has similar size to non-minified ... HOT 1
- Is it possible to force Alephbet to use a specific variant in development? HOT 2
- Events not posted to GA HOT 2
- [question] Reasons for switching to basil.js? HOT 4
- Uncaught TypeError: AlephBet.Goal is not a constructor HOT 2
- Uncaught TypeError: localStorage.set is not a function HOT 4
- _alephbet.default.LamedAdapter is not a constructor HOT 5
- Publish Node.js automatically when releasing on Github
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 alephbet.