Answer the question
In order to leave comments, you need to log in
How to find out that the user does not support the current code on the site?
The essence of the problem is this. Now the site has been updated and it turns out that users using opera mini and other old browsers see an error on the site. i.e. this technology stack is simply not supported by these users. the whole site is on react, requests go through fetch. all sorts of polyfills have already been delivered. that is, you need to somehow determine that the user has an old phone and transfer it to another version of the site. The difficulty is that I don’t know by what parameter to evaluate that the user has an old phone
Answer the question
In order to leave comments, you need to log in
if (!window.fetch) {
console.log('тебе с нами не по дороге, старый телефон!')
location.href = 'https://www.google.com/search?q=купи+телефон'
}
Approximately according to the same principle, you can check the rest of the features. And it's better than figuring out the phone model. On many old phones, you can also install new browsers.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question