UserAgent lookups to define feature support should be a last resort - it's always better to test for the feature - you never know when a new browser will come out and make the test cases fail leaving the user with a suboptimal experience.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Who googled this topic I have an alternate sync version for you, so you don't need to wait till onload or make some promises:
thanks))
p.s.: check this before simple copy it caniuse.com/avif maybe something has updated
UserAgent lookups to define feature support should be a last resort - it's always better to test for the feature - you never know when a new browser will come out and make the test cases fail leaving the user with a suboptimal experience.