logoalt Hacker News

torginusyesterday at 11:37 PM1 replyview on HN

Like one of the things I hate about frontend development - and admire people who do this professionally - is the stupid and arbitrary rules browsers impose on you.

'You may only play audio if such and such conditions are met. However these are different based on browser and platform. Good luck making a solution fitting all these.'

'The browser might lie about what's the available screen estate is, but only sometimes'

'There is a perfect API for what you wanna do, however it's not in Safari'

And a testament on how obscure and arcane knowledge is on doing things right is that I thought there would be some npm packages that do these things for me, but no - you have to hunt around for solutions and fix things yourself.

And LLMs are completely useless and confidently wrong mostly about everything involving this.


Replies

ifwintercotoday at 7:26 AM

Yep fundamentally different from back end because you don't control the client.

In theory the client can do literally anything (for example, someone could be using an ancient version or have some features voluntarily disabled) and you have to decide which things you're going to handle